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.
Hi all,
I'm trying to calculate the percent rank of countries by different macro economic indicators. To calculate the percent rank of something you need the rank of each datapoint within the dataset and the max of the dataset. I have created Rankx and Maxx measure to achieve this. I had to add NOT(ISBLANK to make sure it doesn't count entries that don't have data, and I include a filter by Data and Groupings.
Indicator Rankx = IF(FIRSTNONBLANK(Categories[Category],1)="Balance of Trade"&&NOT(ISBLANK([Value])),RANKX(FILTER(ALL(GNI),[Value<>0&&[Value]=CALCULATE([Value],VALUES('Date'[Date]))<>BLANK()&&[Grouping_column]=MAX(GNI[Grouping_column])),[Value],,DESC,Skip)
Indicator MAXX Rank = MAXX( FILTER(ALL(GNI),[Value]<>0&&[Value]=CALCULATE([Value],VALUES('Date'[Date]))<>BLANK()&&[Grouping_column]=MAX(GNI[Grouping_column])),[Indicator Rankx])
Indicator Pct Rank = IF(NOT(ISBLANK([Value])),([Indicator MAXX Rank]-[Indicator Rankx])/[Indicator MAXX Rank],BLANK())
Hi @rajivraina ,
>>It is simply the (Max - Rank)/Max, which I feel like shouldn't be that hard to calculate?
Yes, it is simply the (Max - Rank)/Max, but when this measure runs, it will also run the Indicator Rankx and Indicator MAXX Rank measure together.
Could you please tell us have you used the 64-bit PowerBI desktop, besides, how many data are you using?
Best Regards,
Teige
@TeigeGao wrote:Hi @rajivraina ,
>>It is simply the (Max - Rank)/Max, which I feel like shouldn't be that hard to calculate?
Yes, it is simply the (Max - Rank)/Max, but when this measure runs, it will also run the Indicator Rankx and Indicator MAXX Rank measure together.
Could you please tell us have you used the 64-bit PowerBI desktop, besides, how many data are you using?
Best Regards,
Teige
Hi @TeigeGao ,
I am using the 64 bit version, and have about 300,000 rows of data. Total file size is about 13 MBs.
Let me know if you need any more info.
Thanks,
Raj
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 |
---|---|
109 | |
101 | |
75 | |
63 | |
62 |
User | Count |
---|---|
143 | |
104 | |
102 | |
81 | |
66 |