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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
lenawr
New Member

filtered calculation changes the values

Hi, I have created calcualtion that is supossed to calclate % of bench and alloctaed countrywise. 

Now when I want to see only % of bench it calculates it as 100%. How to see filtered out bench as if there was no filter 

 

unfiltered 

lenawr_0-1754503499066.png

filtered 

lenawr_1-1754503553277.png

calculation is : 

Calculation = divide(sum([Count of Unique GGID]),CALCULATE(SUM([Count of Unique GGID]),ALL([Category_1])))

 

6 REPLIES 6
v-ssriganesh
Community Support
Community Support

Hello @lenawr,

Hope everything’s going great with you. Just checking in has the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.

Thank you.

Hi @v-ssriganesh  unfortunately none of solutions worked 

Hi @lenawr,

Thank you for updating us on the issue and thanks to @Rupak_bi for sharing helpful insights.

 

Could you confirm if @Rupak_bi's solution resolved your query? This information will assist other members facing similar challenges.

 

Thank you for being part of the Microsoft Fabric Community.

Hi @lenawr ,

Here is your solution.

Rupak_bi_0-1754918535505.png

 

Rupak_bi_1-1754918557074.pngRupak_bi_2-1754918571904.png

Rupak_bi_3-1754918632938.png

 

The Dax Measure is as below.

Per = 
var current_val = sum('Table'[GGID])
Var total_Val = calculate(sum('Table'[GGID]),ALLEXCEPT('Table','Table'[Country]))
return
DIVIDE(current_val,total_Val,0)

If this works, Accept as solution,  Else let me know whats going wrong.



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/
v-ssriganesh
Community Support
Community Support

Hello @lenawr,
Thank you for reaching out to the Microsoft Fabric Community Forum.

I have reproduced your scenario using the sample data and DAX logic you shared. I understand that you were facing an issue where, after filtering for only "Bench", your measure was returning 100% instead of showing "Bench as % of total (Bench + Allocated)".

Your original DAX measure used ALL([Category_1]), which doesn't fully override the visual filter context when you select "Bench" only. As a result, both numerator and denominator were filtered to "Bench" leading to 100%.

To ensure the calculation shows "Bench as % of total" even when filtered, I used this updated DAX:

Calculation =

DIVIDE(

    SUM(BenchData[Count of Unique GGID]),

    CALCULATE(

        SUM(BenchData[Count of Unique GGID]),

        REMOVEFILTERS(BenchData[Category_1])

    )

)

Output:

  • When viewing both Allocated and Bench, the percentages are shown per group.
    vssriganesh_0-1754560176742.png

     

  • When filtering only Bench, the percentages still reflect Bench as a % of total (not 100%).

vssriganesh_1-1754560176744.png

 

I’ve attached the working .pbix file for your reference. Please feel free to download it and explore the measure and matrix visual setup.

 

Best regards,
Ganesh Singamshetty.

FBergamaschi
Solution Sage
Solution Sage

Calculation = divide(sum([Count of Unique GGID]),CALCULATE(SUM([Count of Unique GGID]),ALL([Category_1]), ALL([Country]))

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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