Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
)
)
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
9 | |
7 |