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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors