Forum Discussion
Need Help with Rankx
Thanks!
Here are the pictures of resultsets. I have masked some columns for confidentiality reasons.
I am giving here an example of rank based on column called "Unmonitored Assets".
Here is how Unmonitored Assets (a measure) is calculated:
Unmonitored Assets = CALCULATE(DISTINCTCOUNT(TableName [AssetName]), TableName [Excepted_Assets] = 0) + 0 --> filtering on column Excepted_assets = 0 and getting the distinct count for those assets.
The rank measure is as follows:
Rank = RANKX (all(TableName),[Unmonitored Assets]) -- > I want to rank the table based on number of "Unmonitored Assets".
Here is what I see:
Rank = 1 for all Unmonitored Assets >0
Rank = 160001 for all Unmonitored Assets =0
What is going on, anyone?
Need a sense of your source data. In that table, do [AssetName]'s appear once or multiple times? I really think that you need to do a SUMMARIZE of your table based on some grouping of which I am not clear about yet and then do an ADDCOLUMNS to add a rank column as shown in previous reply.