I have a table of data that has macroeconomic data on countries over a period of years. I am trying to assign a rank to each country based on their value, while still taking into account the Year, Indicator, and Grouping columns AND skipping over any blank Values. The end result would read like the "Rank" column in the below sample picture. I've tried adapting lots of different forum posts to my problem but nothing has been successful and I just cannot seem to figure it out..I know it should be possible with some combination of the Rankx(Filter(All( functions.
To me the logic would be something like: If the Value is not blank then Rank the country's value against all other nonblank country values within the same Indicator, Grouping, and Year.
I would also probably need to use RANKX function as I need a way to switch from ASC to DESC ranking depending on the Indicator, as for some indicators the lower value the better while others a higher value the better.
Your solution does seem similar however it seems to be ranking based on a measure instead of a calculated column. I tried adapting your formula to my case but it does not achieve the ranking result I want, do you mind seeing where I messed up?
@rajivrainaquick question, why you want to add this as column instead of measure?
@parry2k I think you misunderstood, I want to add this as a measure, but my values that I am ranking by are in a column-- all my data is in columns. In your previous post the person had values coming from a measure. so I had to adapt the expression part of the Rankx formula you had to include this and idk if that's why it is not working: