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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
shareezsaleem
Helper III
Helper III

Grand total should change based on slicers and filters but not on interaction

Hi Experts,

I am looking for a DAX measure to get the percentage on an overall total.

I don't want to change the Overall Total based on clicking on graphs or table in the dashboard - the total should only change based on the filters and slicers.

 

DAX:

1. % On Overall Total = DIVIDE([Sum based on selection],[Overall Total])
2. Sum based on selection = SUM(PRs_POs[Net Order Value (AED)])
3. Overall Total = CALCULATE(SUM(PRs_POs[Net Order Value (AED)]),KEEPFILTERS('Calendar'[Year])) -- this is wrong, I need a correct one.

 

 

Screenshot 2021-11-09 114157.jpg

 

 

1 ACCEPTED SOLUTION
shareezsaleem
Helper III
Helper III

Got it finally.

 

1. Sum based on selection = SUM(PRs_POs[Net Order Value (AED)])
2. 
Overall Total Based On Filters & Slicers = Calculate([Sum based on selection],ALL(),VALUES('Calendar'[year]),PRs_POs[Deletion Indicator]<>"X")

 

 

 

3. % On Overall = DIVIDE(PRs_POs[Sum based on selection],[Overall Total Based On Filters & Slicers])

View solution in original post

6 REPLIES 6
shareezsaleem
Helper III
Helper III

Got it finally.

 

1. Sum based on selection = SUM(PRs_POs[Net Order Value (AED)])
2. 
Overall Total Based On Filters & Slicers = Calculate([Sum based on selection],ALL(),VALUES('Calendar'[year]),PRs_POs[Deletion Indicator]<>"X")

 

 

 

3. % On Overall = DIVIDE(PRs_POs[Sum based on selection],[Overall Total Based On Filters & Slicers])

v-robertq-msft
Community Support
Community Support

Hi, 

According to your description, I think you are talking about the “Edit interaction” function in the Power BI desktop. I suggest you to click on the card visual that displays the total value in the card chart then select “Edit interaction” on the above then set other visuals’ interaction types to “None” like this:

vrobertqmsft_0-1636531040986.png

vrobertqmsft_1-1636531040989.png

vrobertqmsft_2-1636531040990.png

 

For more info, please refer to this official document:

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Not exactly.

My requirement is simple.

I have a total (Card) based on selection, which is fine.

I need to show the mgt. what is the % on overall based on selection/slicing the data.

For. e.g. If I am selecting year 2021 in slicer, the total amout is 15M, now if I select a particular vendor (on graph) or a category, the total amount changes - which is fine. Say, I have selected a category 'AMC' and the amount is 3M, I want to show 3/15 which is 20%.

Here in my formula it shows 100% except for Month graph, if I select a month on a graph, it shows the correct percentage.

Overall Total = Divide(PRs_POs[Sum based on selection],CALCULATE(SUM(PRs_POs[Net Order Value (AED)]),ALLEXCEPT('Calendar','Calendar'[Year])))
shareezsaleem
Helper III
Helper III

Any luck to get a solution?

amitchandak
Super User
Super User

@shareezsaleem , Try like, if that can help

 

Overall Total = CALCULATE(SUM(PRs_POs[Net Order Value (AED)]),allselected(PRs_POs) )

No, its not working, it slice the figure whenever I click on a bar or anything on the chart.

I need to show this value as the total.

When I used the below measure, it doesn't slice the amount on month selection but for other like vendor, category, plant name, LTPA it's slices the figure. Can I please have a solution?

CALCULATE(SUM(PRs_POs[Net Order Value (AED)]),ALLEXCEPT('Calendar','Calendar'[Year]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors