Forum Discussion
Krystyna
3 years agoRegular Visitor
Rankx for every year
Hello Krystyna here I am new in PowerBi world and I need some help with a RANKX function. My data has only three columns: ProductId, Year, Value I need to rank products for every year. I created ...
- 3 years ago
Hi Krystyna ,
Based on your description, I have created a simple sample:
Please try:
Measure = RANKX(ALLEXCEPT('Table','Table'[Year]),CALCULATE(SUM('Table'[Value]),FILTER(ALLEXCEPT('Table','Table'[Year]),[ID]=EARLIER('Table'[ID]))),SUM('Table'[Value]),,Dense)Output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thennarasu_R
3 years agoResponsive Resident
Krystyna
Hi,
Try This One
ProductRank = RANKX(ALL('Table'[Year]), CALCULATE(SUM('Table'[Value]),,Desc)
Thanks ,
Thennarasu
Krystyna
3 years agoRegular Visitor
Results:
Many doubled ranks when value is completely different
- Thennarasu_R3 years agoResponsive Resident
Krystyna
Rewrite Dax Inside the ALL Functions Change column to Table
Thanks,
thennarasu