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 September 15. Request your voucher.

Reply
rgoo
Frequent Visitor

how to get sum of % grand total in sliced table

i have a table with some slicers, when no slicers are selected the total shows 100%

rgoo_0-1717402865253.png

when i have slicers selected, how do i modify such that the total will be show as the sum of the selected slicers i.e. the total % should be 14 instead of 100%. 

rgoo_2-1717402969284.png

 

This is my current dax: 

HC_234 = CALCULATE(SUM('Hc Ship Opex Table'[HC FY23]), REMOVEFILTERS('Hc Ship Opex Table'[Office]))

i have also tried using:

HC_234 = 
VAR testt = CALCULATE(SUM('Hc Ship Opex Table'[HC FY23]), REMOVEFILTERS('Hc Ship Opex Table'[Office]))

RETURN
IF(
    HASONEVALUE('Hc Ship Opex Table'[Office]),
    testt,
    "1"

)

 but its not retuning me what i want

rgoo_3-1717403387166.png

 

2 REPLIES 2
amitchandak
Super User
Super User

@rgoo , Try like

 

HC_234 = CALCULATE(SUM('Hc Ship Opex Table'[HC FY23]), allselected('Hc Ship Opex Table'[Office]))

 

or

HC_234 = CALCULATE(SUM('Hc Ship Opex Table'[HC FY23]), allselected())

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

i have tried the 2 dax but it's not givng what i need. So far, the closest i have been is:

 

HC_23 = CALCULATE(SUM('Hc Ship Opex Table'[HC FY23]), REMOVEFILTERS('Hc Ship Opex Table'[Office]))

 

 which gives me the % grand total compared to the total when sliced. However, i am trying to get the see if it's possible to set the total to the sum of current slicked rows which in this case will be 25% instead of 100%

rgoo_1-1717463117859.png

 

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.