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
CD1
Frequent Visitor

Calculate dynamic percentage difference with slicers

Is it possible to calculate a percentage difference that dynamically changes based on slicers.

 

POWER BI.png

Table 1: YTD 

Table 2: What I want when filtering with slicers (here by month)

Table 3: The result 

 

I've tried two methods to show the Mix % calculation:

 

1) show mix % based on volume column as percentage of column - but can't calculate correct mix difference

2) calculate mix by dividing volume by sum of volume - doesn't work because the sum of volume is based on a different summary table and therefore can not filter correctly with slicers (I need to be able to filter my table and show 100% mix based on what is filtered and not over the original total)

 

Any suggestions?

1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @CD1

 

You may try to use ALLSELECTED Function (DAX) as below. Here is the reference for you.

 

https://community.powerbi.com/t5/Desktop/Percentage-Sum-Total/m-p/469771#M218237

 

Mix% Actual =
DIVIDE (
    SUM ( 'table'[Volume] ),
    CALCULATE ( SUM ( 'table'[Volume] ), ALLSELECTED ( 'table'[Slicer] ) )
)

Regards,

Cherie

 

Community Support Team _ Cherie Chen
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

2 REPLIES 2
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @CD1

 

You may try to use ALLSELECTED Function (DAX) as below. Here is the reference for you.

 

https://community.powerbi.com/t5/Desktop/Percentage-Sum-Total/m-p/469771#M218237

 

Mix% Actual =
DIVIDE (
    SUM ( 'table'[Volume] ),
    CALCULATE ( SUM ( 'table'[Volume] ), ALLSELECTED ( 'table'[Slicer] ) )
)

Regards,

Cherie

 

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

Can you share what you have tried and the actual and desired results. (i.e. what do you measures look like, if you cant' share you model at least show a screen shot of the tables and hwo they are related and the definitions of the key measures. 

 

Tip - the measures will probably look like this

 

Total Volume Actual = CALCULATE([Volume_Act],All(table[Company]))

Mix % Actual = DIVIDE([Volume_Act],[Total Volume Actual])

 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.