Forum Discussion
Calculating Total N per Year & Ranking per year
Hello!
I am trying to rank selected reasons and show % from the total N. I am having issues from the current measure i created as the dataset have multiple years of the data.
Below is what I have so far:
4 Replies
- amitchandakSuper User
Anonymous , Try like this , if that can help
RANKX(filter(ALL('Historical'[ReasonName], 'Historical'[Year] ), [Year] =max([Year])),[Reasons Count],,0)
refer, if needed
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
- AnonymousNot applicable
- AnonymousNot applicable
Hi Anonymous ,
Please update the formula of your measure [Reason Ranking] as below and check whether it can get the correct result...
Reason Ranking = RANKX(ALLSELECTED('Historical'[ReasonName]),[Reasons Count],,0)If the above one is not working, please provide some sample data(exclude sensitive data) and your expected result with backend logic and special examples. Thank you.
Best Regards
- AnonymousNot applicable
Hi Anonymous,
Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem with you. Thank you.
Best Regards