Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Apologies if this is obvious, i have not been able to find a solution for this.
I have this measure
Solved! Go to Solution.
=
IF(
MAX( table1[PUBLISHED] ),
RANKX(
CALCULATETABLE( ALLSELECTED( table1[some column] ), table1[PUBLISHED] = TRUE ),
[measure]
)
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
=
IF(
MAX( table1[PUBLISHED] ),
RANKX(
CALCULATETABLE( ALLSELECTED( table1[some column] ), table1[PUBLISHED] = TRUE ),
[measure]
)
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Brilliant, this works perfectly, thanks for your help.
Hey @Anonymous ,
you can use the FILTER function to filter something.
And if you use a measure you don't need a CALCULATE without any parameters. Try the following approach:
RANKX(FILTER(ALLSELECTED(Table1), Table1[myColumn] = "MyValue"),[measure], , DESC)
Hi Denis,
I have tried this but it is still giving ranks to rows that do not have that value:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
62 | |
55 | |
55 | |
36 | |
34 |
User | Count |
---|---|
76 | |
73 | |
46 | |
45 | |
43 |