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

Join 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.

Reply
Anonymous
Not applicable

Based on the slicer calculate rank dynamically and summarize data for rank =1

Hi Team,

 

I have calculated rank dynamically by :

 

Rank Measure :                                                                                

Rank = rankx(filter((Query2),Query2[Participant]=min(Query2[participant])),[MinDate],,1) 

 

Rank is working fine.

The problem is when I want group by section and find the average of the data for rank=1 for the chosen participant from the slicer ,its not working with the below measure.

 

Average Value =
CALCULATE (
    AVERAGE ( Query2[Value] ),
    FILTER ( VALUES ( Query2[Participant] ), [Rank] = 1 )
)

 

Below example in the screenshot the average should be 7 but with the above measure it is showing as 6 whi h is incorrect.

 

Please help me on this..

 

 

large.png

 

Thanks..

 

2 REPLIES 2
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Anonymous,

I create a summarized table as shown in the following PBIX file, and then calculate the average value.

https://1drv.ms/u/s!AhsotbnGu1NokzrR5HvyEnrq4zqB

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-yuezhe-msft

 

Thanks for the help..I t really worked except a small problem with rank..

 

Actually,you have created column rank but I need a measure rank. The reason is I want the rank to change dynamically based on date slicer. As far as I know, Column rank don't work dynamically..

 

See screenshot When I change the slicer the column rank is showing the rank that is already there but not dynamically changing the rank.

 

Capture1.PNG

 

I have added a measure rank ,

 

 Rank_Measure = rankx(filter(ALLSELECTED(Query2),Query2[Participant]=min(Query2[Participant])),CALCULATE(min(Query2[Date])),,1)

 

But calculatetable DAX  not allowing to put rank_measure 

 

 

Calculated table is not dynamic , it means when date slicer is changed the rank would change but that changed data is not updated in the calculatedtable...

 

I want the calculated table to be dynamic ...

 

please help on this 

 

Thanks

 

 

Thanks

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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