Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Calculate new column rank and rank should change dynamically based on Slicer

Hi Team,

 

I have calulated rank based on new column (Not measure) with below DAX

 

Column Rank  = rankx(FILTER(Sheet2,Sheet2[Participant]=EARLIER(Sheet2[Participant])),Sheet2[Date],,asc)

q.PNG

 

Now I have added date slicer and unfortunately, rank is not changing dynamically, it is showing only the rank for the selected dates..

b.PNG                                                                                                              I wanted to see rank as  1 and 2 instead of 3....

 

Please help

Thanks

 

 

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

Hi @Anonymous

 

You must use a MEASURE,, if you want RANK to dynamically change

 

Try this

 

Rank MEASURE =
RANKX (
    SUMMARIZE ( ALLSELECTED ( Sheet2 ), Sheet2[Participant], Sheet2[Date] ),
    CALCULATE ( SUM ( Sheet2[Date] ) ),
    ,
    ASC,
    DENSE
)

@Anonymous

 

Please see the sample file attached as well

Anonymous
Not applicable

 

Hi @Zubair_Muhammad

 

 


I have put my requirements in the attached File..Please have a look at it and help me on this..

 

 

 

a.png

 

 Measure :

SumofData = CALCULATE(sum(Sheet2[Value]),FILTER(VALUES(Sheet2[Section]),[Rank_test]=1))

Is there is something wrong with the measure? 

 

 

Can you tell me how to attach a file ?

 

 

PBIX file

https://1drv.ms/u/s!Ast81bzOCNiqhDUGaZAUf-CrVvSU

 

Thanks

 

 

 

 

Anonymous
Not applicable

Thanks @Zubair_Muhammad

 

 

After calculating Rank dynamically, I wanted to find the average of the data for rank =1

 

I have put my question in a separate forum and you already helpmed me on this but unfirunately, the soultion didn't work..

 

Could you please look in to this?

 

https://community.powerbi.com/t5/Desktop/Calculate-rank-on-the-fly-based-on-the-slicer-and-filter-th...

 

Thanks ..

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors