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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Mat42
Resolver I
Resolver I

Fixed Chart Comparator

This feels like it should be simple, but for the life of me I can't work out how to do it.

Let's say I have a very simple table containing the following entries:

 

NameSales FiguresYearly Total
Dave1231119
Susan2231436
Linda5782007
Mike3421996
Steve1112015
Company Average413

2134

 

All I want to create is a simple, 2 bar horizontal bar graph to compare staff details against the Company Average. The slicer will contain staff names and when I choose a name, I want it to display the Company Average as a fixed comparator so that it will always be visible on the chart, but the staff name will change with the slicer.

 

I've attached a couple of example images.

Example 2.png

 

Example 1.png

 

I've tried various things and I just can't work it out...which feels stupid because it must be simple.

 

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You don't need to include the Company average in your data if you can also compute it on the fly. But if that is not possible then you can still make it work by using a separate measure.

 

Sales Average := CALCULATE(sum(Performance[Sales Figures]),Performance[Name]="Company Average")

 

Then add the Sales Figures value and the new measure to the Values well.

 

lbendlin_0-1600730578236.png

 

 

 

 

 

 

 

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

You don't need to include the Company average in your data if you can also compute it on the fly. But if that is not possible then you can still make it work by using a separate measure.

 

Sales Average := CALCULATE(sum(Performance[Sales Figures]),Performance[Name]="Company Average")

 

Then add the Sales Figures value and the new measure to the Values well.

 

lbendlin_0-1600730578236.png

 

 

 

 

 

 

 

@lbendlin, that's brilliant and works as I need it to. Quick related follow-up question:

 

Because this is part of a larger report I'm slowly building up, I'm adding new sections every day and I now have 2 tables: the simple data table I explained before, and a new table called 'Names' that I've created to only contain (unsurprisingly) staff names. I've joined the Names table to the data table using a one-to-one relationship. 

 

If I follow your instructions, then produce a slicer containing staff names using the original data table, the chart displays correctly. However, if I create a slicer using the new Names table the Sales Average data disappears off the chart.

 

Is there something that needs changing in the measure?

Change the relationship to 1:M from Names to Data. Then change the measure to compute the company average properly as I mentioned initially.

@lbendlin Perfect!

 

Thanks a lot.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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