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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Ranking with animated filter context

Hey everyone,

 

I have an animated dashboard. And I want to show the top 10 drivers who have been awarded with the most points (points received per season). The ranking does work when the animation isn't running. When the animation is running, I only see the rank of the drivers of that particular year compared to all previous years. But I also want to see the rank of the drivers from the previous years. I hope the image makes it clear:

 

Rank points.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The rank formula is as follows:

Rank highest points per season =
CALCULATE(RANKX(ALL(PointsByYear[DriverAndYear]),
[Highest points per season],,
DESC, Dense),
ALL(PointsByYear),VALUES(PointsByYear[DriverAndYear]) )
 
And the formula Highest points per seasons is: 
Highest points per season =
CALCULATE(SUM(PointsByYear[PointsbyYear] ),
FILTER(ALL('Date'),'Date'[Date] <= MAX('Date'[Date]))


 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found the solution for the Rank measure. Apparantly, you also had to filter the date for the Rank measure. 

So, the first measure was this: 

Highest points per season =
CALCULATE(SUM(PointsByYear[PointsbyYear] ),
FILTER(
ALL('Date'),'Date'[Date] <= MAX('Date'[Date]))
 
And the rank measure is as following:
Rank highest points per season =
CALCULATE(RANKX(ALL(PointsByYear[DriverAndYear]),
[Highest points per season],,
DESC, Dense ),
FILTER(ALL('Date'),'Date'[Date] <= MAX('Date'[Date]))

View solution in original post

5 REPLIES 5
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

Thanks for reaching out to us.

>> The ranking does work when the animation isn't running. When the animation is running, I only see the rank of the drivers of that particular year

Question1,

vxiaotang_0-1659079009451.png

Question2: when the animation isn't running, what are the output values in your table? Can you take a screenshot?

Question3: What is the animation, is the slicer set? If yes, can you share the sample file? If there is a lot of data in the file, you can simplify it then share. Thank you.

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @v-xiaotang ,
Thanks for your reply. 

 

Question 1: Yes, exactly!

Question 2: 

Rank no animation.pngRank with slicer.png

 

When the animation isn't running, the ranking works just fine. It also works when a slicer is added. 

 

Question 3:

Not sure if I understand your last question, but I am using the visual Play Axis. I've added the link below, so you can check it out yourself:

 

https://drive.google.com/file/d/1PH8jbh5DYKJWM8MHfe8V7C5yxW2Th32N/view?usp=sharing

 

 

 

 

 

Hi @Anonymous 

Thanks for your sample file.

>> When year=1971, DriverAndYear actually has only 54 rows, but the table on the left is obviously much more than 54 rows.

vxiaotang_0-1659342939270.png

So I'm wondering what you're trying to calculate. My understanding is that when the animation goes to 1971, the table should only show 54 items from 1971. As for the table on the left, the rows for other years are shown, which is apparently due to a mismatch caused by the use of incorrect measure.

vxiaotang_1-1659343306576.png

So for 1971, 54 rows, what should the output of Highest points per season be?

vxiaotang_2-1659343492243.png

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@v-xiaotang thanks for your reply! My apology for this late respons; I was on holiday. 

 

The output when the animation is in 1971 should be like this:

Rank example.png

Anonymous
Not applicable

I found the solution for the Rank measure. Apparantly, you also had to filter the date for the Rank measure. 

So, the first measure was this: 

Highest points per season =
CALCULATE(SUM(PointsByYear[PointsbyYear] ),
FILTER(
ALL('Date'),'Date'[Date] <= MAX('Date'[Date]))
 
And the rank measure is as following:
Rank highest points per season =
CALCULATE(RANKX(ALL(PointsByYear[DriverAndYear]),
[Highest points per season],,
DESC, Dense ),
FILTER(ALL('Date'),'Date'[Date] <= MAX('Date'[Date]))

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.