Forum Discussion
Rinn
2 years agoFrequent Visitor
Rank by group and sum
Hi, I have difficulties to calculate the rank over my table with a sum. Here my fact table : year_quarter country value 2024-Q1 US 10 2024-Q1 US 14 2024-Q1 Belgium 23 2024...
- 2 years ago
Hi Anonymous ,
Your reply helped me, I just adjusted it a little bit to sum by quarter and country :
rank = RANKX(FILTER('Table',[year_quarter]=EARLIER('Table'[year_quarter])),SUMX(FILTER('Table',[year_quarter]=EARLIER('Table'[year_quarter])&&[country]=EARLIER('Table'[country])),[value]),,ASC,Dense)Thanks a lot !
Regards.