Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi I have a table of data that looks like this:
And when I put it into a Matrix it looks like this:
And what I'm looking for is a Matrix that looks like this:
I've tried various things in the .pbix attached but none of them work.
I'd like to achieve it using DAX if possible, so that I can add to it in future. Can you help?
Thanks in advance.
Solved! Go to Solution.
Hi @AltGr9
Add the Class_new and Row Header columns to the data table
Class_new =
SWITCH(
TRUE(),
[Class] = "Class 1", "Class A",
[Class] = "Class 2", "Class B",
[Class] = "Class 3", "Class C")
---------------------------------------
Row Header = "Top Site"
Follow these steps
Тop Site =
VAR _maxdate =
CALCULATE ( MAX ( 'Data'[Amount] ), ALLEXCEPT ( 'Data', 'Data'[Class_new] ) )
RETURN
CALCULATE (
MAX ( 'Data'[Site] ),
FILTER (
'Data',
'Data'[Class] = MAX ( 'Data'[Class] )
&& 'Data'[Amount] = _maxdate
)
)Hi @AltGr9
Try
Top Site =
MAXX ( FILTER ( TableName, TableName[Amont]=MAX(TableName[Amont]), TableName[Site])
please make sure to enable "Values on rows"
Hi @AltGr9
Add the Class_new and Row Header columns to the data table
Class_new =
SWITCH(
TRUE(),
[Class] = "Class 1", "Class A",
[Class] = "Class 2", "Class B",
[Class] = "Class 3", "Class C")
---------------------------------------
Row Header = "Top Site"
Follow these steps
Тop Site =
VAR _maxdate =
CALCULATE ( MAX ( 'Data'[Amount] ), ALLEXCEPT ( 'Data', 'Data'[Class_new] ) )
RETURN
CALCULATE (
MAX ( 'Data'[Site] ),
FILTER (
'Data',
'Data'[Class] = MAX ( 'Data'[Class] )
&& 'Data'[Amount] = _maxdate
)
)Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |