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 a basic table "aftersales" like this :
Dealer | Sales |
A | 1000 |
B | 3000 |
C | 2000 |
D | 1700 |
E | 5000 |
I want to tank them.
If I do it creating two measure it works :
measure 1 : sales_amount = sum('aftersales'[Sales])
measure 2 : ranking = rankx(all('aftersales'[Dealer],[sales_amount])
But If I try to put it all in 1 measure, it fails (everyone get ranked 1)
measure 3 : ranking = rankx(all('aftersales'[Dealer],sum('aftersales'[Sales]))
Can someone help me understand why ?
Solved! Go to Solution.
measure 3 :
ranking =
RANKX (
ALL ( 'aftersales'[Dealer] ),
CALCULATE ( SUM ( 'aftersales'[Sales] ) )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
thanks @SanketBhagwat and @Jihwan_Kim for your help
It did not work by removing the sum but it worked by adding a calculate before the sum
Hi @Arkhos94 .
You don't need to use 'sum' in here;
ranking = rankx(all('aftersales'[Dealer],sum('aftersales'[Sales])).
Remove 'sum' function and try it.
If this helps you, then please mark it as 'Accept as Solution' so that others could find it easily and give it a big thumbs up.
Regards,
Sanket Bhagwat
measure 3 :
ranking =
RANKX (
ALL ( 'aftersales'[Dealer] ),
CALCULATE ( SUM ( 'aftersales'[Sales] ) )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
106 | |
105 | |
88 | |
75 | |
66 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |