The Matrix Visual in Power BI
A matrix is Power BI’s cross-tab: categories down the rows, categories across the columns, and measures in the values — the same idea as a PivotTable, including totals you must check before you trust them.
Friends! A table dumps columns. A matrix answers “City by month”. Why do totals embarrass people? Because a percent was summed like money. How? We build a FreshBasket (fictional) matrix, set the layout, turn on expand icons, and switch off totals that do not add. Grid first, honesty second.
मित्रांनो! table कॉलम ओकतं. matrix “शहर गुणिले महिना” उत्तर देतो. बेरीज लोकांना का लाजवते? कारण टक्का पैशासारखा मिळवला गेला. कसे? FreshBasket ची matrix बनवायची, मांडणी ठरवायची, उघडण्याची चिन्हे लावायची, आणि न मिळणाऱ्या बेरजा बंद करायच्या. आधी जाळी, मग प्रामाणिकपणा.
मित्रों! table कॉलम उड़ेल देता है. matrix “शहर गुणा महीना” का जवाब देता है. जोड़ लोगों को क्यों शर्मिंद करते हैं? क्योंकि प्रतिशत को पैसे की तरह जोड़ दिया गया. कैसे? FreshBasket की matrix बनाओ, जमावट तय करो, खोलने के निशान लगाओ, और जो जोड़ नहीं बनते उन्हें बंद करो. पहले जाल, फिर ईमानदारी.
Quick answer
Vertical build:
- Insert the Matrix visual.
- Rows: City (and a second level if you need it).
- Columns: month from the Date table.
- Values: measures such as
[Total Sales]. - Stepped layout on means indent; off means a column per level.
- Keep totals for sums. Remove totals for percents that were merely added up.
Real example: city down the side, month across the top
| Jan sales | Feb sales | Mar sales | Mar phone bill | |
|---|---|---|---|---|
| Mumbai | 800 | 900 | 1000 | 699 |
| Pune | 400 | 420 | 160 | 399 |
Why a matrix: the owner wants the crossing, "Mumbai in March", not a picture. Rows are cities. Columns are months. Values are measures.
What happens:
- The Mumbai row is a filter. Only Mumbai slips go in. March sales out: 1000.
- The Pune × March cell uses Pune rows only. Sales out: 160.
- The phone bill is a second measure, not a third city. March Mumbai bill out: 699. Do not add the bill into the sales total. Different question.
- A total of sales across the two cities in March is fair: 1160, if both cities are in the filter.
- A total of "percent of the month" is not fair if the visual merely adds 80% + 20%. The percent measure must be calculated again on all rows in that column.
Why FILTER is usually not on this visual: the matrix already filters. City and month are the filters. You write FILTER in a measure only when the cell needs an extra test, such as "sales from slips above 250".
Click Mumbai in a slicer and the Pune row should disappear. If both rows remain, the slicer is not on the same City column as the matrix.
What do I need before this guide?
- Choose a chart so you know when a grid is the right answer.
- Percent of total if a value is a percent.
- Course: Matrix.
Before and after (look at the tables first)
Before
आधी (Before)
पहले (Before)
After
नंतर (After)
बाद में (After)
Field wells
A matrix is a cross-tab: rows, columns and values, like a PivotTable.
matrix एक क्रॉस जाळी आहे: rows, columns आणि values, PivotTable सारखी.
matrix एक क्रॉस जाल है: rows, columns और values, PivotTable की तरह.
- Click empty canvas, then the Matrix icon.
- Rows:
Customer[City]. AddSales[Channel]under it if the second level matters. - Columns:
'Date'[Month Name]or Year-Month. Use the Date table so months sort in calendar order, not alphabetically by accident. - Values:
[Total Sales]. Add[Orders]only if the reader can still see the numbers. - If months sort as April, August, December, you sorted text. Fix the sort column on the Date table (month number), not the matrix font.
Layout and expand
Stepped layout indents levels; turn it off when you want each level in its own column, and use +/- to expand.
Stepped layout पातळ्या आत सरकवते; प्रत्येक पातळीला स्वतःचा कॉलम हवा असेल तर बंद करा, आणि उघडण्यासाठी +/- वापरा.
Stepped layout परतें अंदर खिसकाता है; हर परत को अपना कॉलम चाहिए तो बंद करो, और खोलने के लिए +/- इस्तेमाल करो.
- Select the matrix → Format visual.
- Stepped layout on: City and Channel share one column, Channel indented. Good when space is tight.
- Stepped layout off: each level gets its own column, closer to a classic PivotTable.
- Turn +/- icons on so a reader can expand one city without expanding all.
- That expand is drill inside the matrix. It is not drill through to another page.
- Switch values to rows when several measures should stack vertically under each city.
Totals that lie
A sum of sales can be a total. A sum of percents usually cannot — turn that total off.
विक्रीची बेरीज एकूण असू शकते. टक्क्यांची बेरीज सहसा असू शकत नाही — तो एकूण बंद करा.
बिक्री का जोड़ कुल हो सकता है. प्रतिशतों का जोड़ अक्सर नहीं हो सकता — वह कुल बंद करो.
- Grand total of
[Total Sales]is fair if the measure is a sum. - Grand total of a percent column is fair only when the percent measure uses
DIVIDEandCALCULATEso the total row recomputes. A visual that adds 20% + 30% + 50% into 100% by luck is not a design. - A total of average delivery minutes is often nonsense. Turn row subtotals or column totals off for that value.
- Read the total row yourself before the review. If you cannot explain it, hide it.
A readable matrix
- Do not put ten measures in Values. Two is a lesson. Four is a meeting. More is a spreadsheet export.
- Widen the row header so City is not cut off.
- Repeat the question in the title: “Sales by city and month”.
- Use the Filters pane for a year, not twenty slicers around the grid.
Ghabru naka — a matrix that needs a magnifying glass is a table that should have been filtered first.
Mistakes and calm fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| Months A–Z | Text sort | Sort by month number |
| Percent total is 400% | Values were summed | Fix the measure, or hide the total |
| Cannot expand | No second row field, icons off | Add a level and +/- |
| Blank months | Relationship or filter | Date table join, check slicers |
Ravindra Bagale's Tip
Interview line: “A matrix is rows, columns and values. I turn off totals that do not make sense, especially summed percentages, and I use +/- only when there is a real hierarchy.” Mention stepped layout if they ask about PivotTable look. Got it?
Ravindra Bagale's Tip – मराठी
मुलाखतीचे वाक्य: “matrix म्हणजे rows, columns आणि values. मी न जुळणारे एकूण बंद करतो, विशेषतः मिळवलेले टक्के, आणि +/- फक्त खऱ्या hierarchy साठी वापरतो.” PivotTable दिसाबद्दल विचारल्यास stepped layout सांगा. समजलं का?
Ravindra Bagale's Tip – हिंदी
इंटरव्यू की लाइन: “matrix मतलब rows, columns और values. मैं बेमेल कुल बंद करता हूँ, खासकर जोड़े गए प्रतिशत, और +/- सिर्फ असली hierarchy के लिए इस्तेमाल करता हूँ.” PivotTable रूप पूछें तो stepped layout बोलो. समझ में आया?
Practice task
- Build City × Month with
[Total Sales]. - Add Channel under City and expand one city.
- Add a percent measure and look at the total row.
- Turn that total off if it does not recompute.
- Title the visual as a sentence.
Got it? Matrix is a cross-tab. Sums can total; many percents cannot. Next: cards and the KPI visual for the numbers above the grid. Let's continue.
समजलं का? Matrix क्रॉस जाळी आहे. बेरजा एकूण होतात; बरेच टक्के होत नाहीत. पुढे: जाळीवरील संख्यांसाठी cards आणि KPI visual. आता पुढे जाऊया.
समझ में आया? Matrix क्रॉस जाल है. जोड़ कुल बनते हैं; कई प्रतिशत नहीं बनते. आगे: जाल के ऊपर की संख्याओं के लिए cards और KPI visual. आगे बढ़ते हैं.
Frequently asked questions
Matrix vs table?
A table is a flat list of columns. A matrix groups rows and columns and can show subtotals, like a PivotTable.
What is stepped layout?
Child levels indent under the parent in one column. Turn it off to give each level its own column.
Why is the percent total wrong?
The visual summed the percent values. The percent measure must calculate again at the total, usually with DIVIDE and CALCULATE.
Can I expand one city?
Yes, with +/- icons, after a hierarchy or multiple row fields. That is drill inside the matrix, not drill through.
Switch values to rows?
Use it when several measures should read down the row instead of sitting side by side.
Course lessons?
Matrix in the visuals chapter, and matrix expand/collapse in the drill chapter.