Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
118 | |
101 | |
71 | |
61 |