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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Show trend line for Top Performing Contractors

Hi,

 

I have a report in which there is a requirement to display scores for a particular contractor over a period of time. The score value is a measure. There is a slicer on the contractor which drives this report. However, there is an additional requirement now with which users want to see a trend of the average score in the same chart for top 20 contractors with highest average score.

I can achive that in a separate chart all together, but is there any option to have it in same chart. The Top 20 contractors can vary over time. So it is important to rank top 20 contractors every year based on their average score and then display the trend line based on that. Any pointers will be very helpful.

Dual axis chart.PNG

1 ACCEPTED SOLUTION

hi, @Anonymous 

You could try this way:

Step1:

Add a rank measure of contractor by vaerage score

Rank = RANKX(ALL(evaluations_of_contractors[Contractor]),[Average Score],,DESC,Skip)

Step2:

Add the top20 contractor average

Top20 Average Score = CALCULATE([Average Score],FILTER(ALL(evaluations_of_contractors[Contractor]),[Rank]<=20))

Result:

5.JPG

and here is pbix file, please try it.

 

Best Regards,

Lin

 

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

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

You may try this way:

Step1:

Add a rank measure for contractors average score.

Step2:

For top 20 contractors average score, add the condiftional by rank maeasure in calculation.

 

If not your case, please share some simple sample data and expected output.

 

Best Regards,

Lin

Community Support Team _ Lin
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-lili6-msft 

Thanks for your reply. This probably does not work for me as the Average score is also a measure. I have now attached the desktop file for your reference at this link https://1drv.ms/f/s!Aiuhygz8zTaWZw5iKz3FxbnadPk 

There is a dual axis chart which is driven by a Contractor dropdown slicer. My requirement is to add another line for the average scores of top performing contractors and should not change based on the slicer selection.

 

hi, @Anonymous 

You could try this way:

Step1:

Add a rank measure of contractor by vaerage score

Rank = RANKX(ALL(evaluations_of_contractors[Contractor]),[Average Score],,DESC,Skip)

Step2:

Add the top20 contractor average

Top20 Average Score = CALCULATE([Average Score],FILTER(ALL(evaluations_of_contractors[Contractor]),[Rank]<=20))

Result:

5.JPG

and here is pbix file, please try it.

 

Best Regards,

Lin

 

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

Hello @v-lili6-msft ,

 

It worked like a miracle, thanks for the support.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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