Forum Discussion
RANKX with USERELATIONSHIP
Hi all,
i have the following problem sitting on it for a long time:
Hi Pikachu-Power ,
Why do you create your measure like below? I don't quite understand.
Measure = CALCULATE(COUNT(Trader[Date2]),USERELATIONSHIP('Calendar'[Date],Trader[Date2]))Just create your measure like so:
Measure = COUNT(Trader[Date2])Then, your [Sort_Condition]:
Or, you can convert [Sort_Condition] to a measure:
Sort_Condition Measure 1 = IF ( MAX ( Trader[Trader] ) <> BLANK (), RANKX ( FILTER ( ALLSELECTED ( Trader ), Trader[Trader] <> BLANK () ), CALCULATE ( MAX ( Trader[Trader] ) ), , ASC, DENSE ) * 0.00001 + [Measure] )Sort_Condition Measure 2 = RANKX ( FILTER ( ALLSELECTED ( Trader ), Trader[Trader] <> BLANK () ), CALCULATE ( MAX ( Trader[Trader] ) ), , ASC, DENSE ) * 0.00001 * [Measure] + [Measure]BTW, .pbix file attached.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
7 Replies
- amitchandakSuper User
some thing like this. But this Rank seems like column. and has no role of date
calculate(RANKX(Table1; Table1[Trader]; ; ASC; Dense),USERELATIONSHIP(Calender[Date];Table1[Date2]) )
You can create a measure
cnt =
calculate(count(Table1[Trader]),USERELATIONSHIP(Calender[Date];Table1[Date2]) )
and have rank on that
RANKX(Table1; [cnt]; ; ASC; Dense)
- Pikachu-PowerImpactful Individual
I tried both cases. Dont work.
- Pikachu-PowerImpactful Individual
How can I load here a .pbix file?