Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |