Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hello,
I've been destroying myself trying to figure this out and I wonder if someone can help.
I have the following table (Simplified to get to the root of my problem):
| Job | Product | Price | SaleDate |
| 1 | A | $100 | 01062024 |
| 1 | B | $200 | 01062024 |
| 2 | A | $110 | 19062024 |
| 3 | C | $300 | 18062024 |
| 4 | A | $120 | 01052024 |
I would like to display it as follows:
| Today | ThisMonth | ThisYear | ||||
| Product | TotalPrice | TotalCount | TotalPrice | TotalCount | TotalPrice | TotalCount |
| A | $110 | 1 | $210 | 2 | $330 | 3 |
| B | 0 | 0 | $200 | 1 | $200 | 1 |
| C | 0 | 0 | $300 | 1 | $200 | 1 |
I can flatten the table and created individual measures for every combination of column (e.g. TodayTotalPrice and TodayTotalCount), but I don't want a flat table. I want the nicely structured matrix that can be collapsed and expanded.
If anyone could please help for this simple example that would be great. I'm confident I'll be able to expand it to my larger dataset.
Thanks.
That's worked perfectly thanks!
Just a follow up question. Is it possible to show and hide certail values based on matrix columns? I want to also add averages after the TotalPrice and TotalCount sections, so it will look like this
| Today | ThisMonth | ThisYear | MonthAverage | YearAverage | ||||||
| Product | TotalPrice | TotalCount | TotalPrice | TotalCount | TotalPrice | TotalCount | PricePerDay | CountPerDay | PricePerDay | CountPerDay |
I can create the second section of matrix columns with a couple new measures and altered switch statements, but how can I hide the values that dont correspond to that section of the table? (Hide TotalPrice, TotalCount from the MonthAverage and YearAverage sections and vice versa).
Cheers.
do the following :
create a custom table : ( No need for the Column "Column")
| TotalPrice |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 18 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 21 | |
| 14 | |
| 12 |