Forum Discussion
gnsantospatty
8 years agoFrequent Visitor
Rankx Formula is giving duplicates values
Hi I'm new in Power BI and Dax language...
I'm trying to build a revenue-based ranking, but the Rankx Formula is giving me duplicates values. How i can fix this?
Formula:
Rank =
RANKX ( ALL ( DimFilial ) ;[Mercantil Valor Líquido];;;Dense)
I solved, using RELATEDTABLE.
Formula:
RANKX(ALL(DimFilial); SUMX(RELATEDTABLE(DimFilial); [Mercantil Valor Líquido]))
5 Replies
- jthomson
Solution Sage
Are the values that RANKX is comparing for those rows the same?
- gnsantospattyFrequent Visitor
No. they aren't the same
- v-chuncz-msft
Community Support
Share a simplified example if possible. You may also try index column in Query Editor.
- gnsantospattyFrequent Visitor
I'm using Direct Query.
- gnsantospattyFrequent Visitor
I solved, using RELATEDTABLE.
Formula:
RANKX(ALL(DimFilial); SUMX(RELATEDTABLE(DimFilial); [Mercantil Valor Líquido]))