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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DanielB
Frequent Visitor

Using total to calculate a different measure

Hi Everyone, I have a problem to which I can't find a result. Basically I am trying to use an absolute total (not affected by any filters that might prop up) over a data-set in a different measure:

 

ShopTownDayBikes Sold
A107/02/20162
A108/02/20164
B107/02/20166
B108/02/20163
C207/02/20167
C208/02/20161

 

  Result 
ShopTownAverage Bikes Sold Per DayScore
A130.8
B14.51.2
C241.0
Total 3.83 

 

My problem is that if I use a report Filter/Slicer to filter down to town level for example, it automatically recalculates the total average and changes the score. I want to be able to slice by town*, but the total to stay the same. What I am basically using now is SUM(BikesSold)/DistinctCount(Shop). To fix the total part I have tried a blank 'Allselected() or Allexcept(town) (-this one takes the max amount of distinct counts over the time period) but it bugs out in a way or the other.

 

Thanks!  

 

1 ACCEPTED SOLUTION

Hi @DanielB,

I try to reproduce your scenario get the expected result, please see the following solution. 

Create a measure using the following formula.

Average Bikes Sold Per Day = AVERAGEX(SUMMARIZE('Table','Table'[Shop],'Table'[Town],"Aa",AVERAGE('Table'[Bikes Sold])),AVERAGE('Table'[Bikes Sold]))

For example, create table used to diplay the shop, town and Average Bikes Sold Per Day values. Create a slicer including town values, when you click 1, it will the corresponding values, and the total average changes automatically.

1.PNG 2.PNG

If you have any other problem, please let me know.

Best Regards,
Angelia



View solution in original post

2 REPLIES 2
LaurentCouartou
Solution Supplier
Solution Supplier

Have you tried with ALL()?

Hi @DanielB,

I try to reproduce your scenario get the expected result, please see the following solution. 

Create a measure using the following formula.

Average Bikes Sold Per Day = AVERAGEX(SUMMARIZE('Table','Table'[Shop],'Table'[Town],"Aa",AVERAGE('Table'[Bikes Sold])),AVERAGE('Table'[Bikes Sold]))

For example, create table used to diplay the shop, town and Average Bikes Sold Per Day values. Create a slicer including town values, when you click 1, it will the corresponding values, and the total average changes automatically.

1.PNG 2.PNG

If you have any other problem, please let me know.

Best Regards,
Angelia



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.