Forum Discussion
Question on RANKX formula and selected value
- 1 year ago
Anonymous is correct. These 2 have "Dont Summarize", and it is parsing out the states further.
If you remove them, or change them to sum or a different aggregation, Rank would work again using:RANKX(
ALL(migrationt[Name]),
CALCULATE(SUM(migration[netflow_tot]))
)
interesting... we tried on my end, and it works... see below:
after selection
Thanks for your comfirmation. I tried both [YEAR], and [STATE] (or NAME) in the ALL('migration'[Name]). Both give me inccorect values, either 1 or 50. And when I took the CALCULATE out, all the values beccame 1 (I did not show it in the attached).
I am wondering if there is something that I have to do with the year filter.
Thank you,
K.
- Tutu_in_YYC1 year agoSuper User
Apologies, you do need the calculate:
RANKX(
ALL(migrationt[Name]),
CALCULATE(SUM(migration[netflow_tot]))
)Does it work with the calculate?
Can you share the pbix with sample data?- kobkabnaja1 year agoHelper II
It does not. The rank showed only the first (1) and the last (50). Amazingly, when I tried to create a sample data and used your code, it worked well!!! This is so confusing to me. Do you have any other ideas why this happened?
Thank you,
K.
- Tutu_in_YYC1 year agoSuper User
I tried to replicate your error, but no dice. Can you share a screenshot of your model view? Maybe theres something we can identify in there