Forum Discussion
Rank vs Rankx
- 5 months ago
Hi smpa01,
I created the RANK version as followsdax_RANK =RANK (DENSE,ADDCOLUMNS(ALLSELECTED( 'fact' ),"@period", RELATED( dim_period[period] ),"@Mycol", [fact_sum]),ORDERBY ( [@Mycol], DESC ),PARTITIONBY ( [@period] ))It works in my pbix both with a without the name in the visualIf this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your threadWant to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Thanks amitchandak . But problem remians the same. RANKX lets me get away with minimum maintenance with fact and partition. Byt RANK needs me to build a Relations table for the Relations parameter that needs all the rows that are present in the visual. When you add or remove rows to the visual, you need to go back to the measure and manually add them, which is not what I want.
When I pass fact table to RANKX it doesn't care about the columns in your visual. It is a preferred pattern for me cause I don't want to keep track what visual gets added or removed.
Can RANK provide exact same facility ?
Hi smpa01,
I created the RANK version as follows
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your threadWant to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI