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 have this rank measure that is ranking less than 0, as "rank 1". But I want it to be classified as last. And as you can see in my calculate, I'm only ranking values> = 0. Would anyone know how to help me?
Solved! Go to Solution.
// Your measure for ranking should be:
[Ranking Measure] =
if( HASONEFILTER( T[Papel] ),
var __maxValue =
// You can replace this value
// with some big, big value that
// you know will never appear as
// the value of [Div Liquida/ebit].
// This will speed up this calculation.
MAXX(
ALLSELECTED( T[Papel] ),
[Div Liquida/ebit]
)
var __greaterMaxValue = __maxValue + 1
var __currentMeasure = [Div Liquida/ebit]
var __result =
if( __currentMeasure < 0,
__greaterMaxValue,
__currentMeasure
)
return
__result
)
// The measure above just assigns to the negative
// values of the measure a value higher than
// the highest value for all the visible values
// of the measure. You should then use this measure
// in the RANKX function. The measure also checks
// if only one Papel value is visible in the current
// context. If not, then it returns BLANK(). So, you'll
// have to make sure that you're calculating ranks
// against single Papel values. But it makes no sense
// to calculate a rank against an amalgamated set of
// values as this has no meaning anyway.
Best
D
// Your measure for ranking should be:
[Ranking Measure] =
if( HASONEFILTER( T[Papel] ),
var __maxValue =
// You can replace this value
// with some big, big value that
// you know will never appear as
// the value of [Div Liquida/ebit].
// This will speed up this calculation.
MAXX(
ALLSELECTED( T[Papel] ),
[Div Liquida/ebit]
)
var __greaterMaxValue = __maxValue + 1
var __currentMeasure = [Div Liquida/ebit]
var __result =
if( __currentMeasure < 0,
__greaterMaxValue,
__currentMeasure
)
return
__result
)
// The measure above just assigns to the negative
// values of the measure a value higher than
// the highest value for all the visible values
// of the measure. You should then use this measure
// in the RANKX function. The measure also checks
// if only one Papel value is visible in the current
// context. If not, then it returns BLANK(). So, you'll
// have to make sure that you're calculating ranks
// against single Papel values. But it makes no sense
// to calculate a rank against an amalgamated set of
// values as this has no meaning anyway.
Best
D
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 |
---|---|
47 | |
24 | |
20 | |
15 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
18 |