Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am trying to get a way to rank for the most Reports with the Least Missing Data Here is my table
Name | Reports | Missing Data | RankMostReports | RankLeastMissing |
Bruce Wayne | 111 | 1 | 1 | 2 |
Clark Kent | 69 | 0 | 3 | 1 |
James Gordon | 89 | 25 | 2 | 5 |
Wally West | 38 | 0 | 5 | 1 |
Hal Jordan | 62 | 5 | 4 | 3 |
So, I want my visual to show only Clark Kent , what would be the DAX for that measure?
This measure returns 1 if the rows should be visible and 0 if not.
[Should Show] =
var __onlyOneNameVisible = HASONEVALUE( T[Name] )
var __isNameColumnSelected = ISFILTERED( T[Name] )
var __shouldCalc =
__onlyOneNameVisible
&& __isNameColumnSelected
var __allVisibleNames = ALLSELECTED( T[Name] )
var __currentName = VALUES( T[Name] )
var __nameWithTheProperty =
topn(1,
filter(
__allNames,
[RankLeastMissing] = 1
),
[Reports],
desc
)
RETURN
if( __sohuldCalc,
1 * ( __nameWithTheProperty = __currentName )
)
Best
D
Perhaps:
Measure =
VAR __Most = MAXX(ALL('Table'),[RankMostReports])
VAR __Least = MINX(ALL('Table'),[RankLeastMissing])
RETURN
IF(__Most = MAX([RankMostReports]) && __Least = MAX([RankLeastMissing),1,0)
This is the error I get
The MAX function only accepts a column reference as the argument number 1.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
25 | |
19 | |
16 | |
8 |
User | Count |
---|---|
58 | |
50 | |
44 | |
21 | |
19 |