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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
THENNA_41
Post Partisan
Post Partisan

How to Get Total value in clustered chart based on slicer selection


i am using in power bi single dataset .that dataset have multiple columns like below  

"Master Data base"

 

VPRegion                Plant              Reduction Buckets             Value
 EE                              AR20                 Supply                           50

 ER                             AR30                  Scrap                             45

 RRR                          ER40                  SEMS                             45
GLOBAL                     ER50                OverStock                       65
 ID                             GL70                 Materials                        56

 

 

i have seperated create calculate column with  below measure 

NewTable = UNION ( VALUES ( 'Master Data Base'[Value]), ROW ( "Reduction Buckets", "Total FY Variation" ) )
 
Then made again createed new measure 
 
 
Measure selc =
IF(SELECTEDVALUE(NewTable[Value])="Total FY Variation",CALCULATE(SUM('Master Data Base'[Value]),ALL(NewTable[Value])),
SUM('Master Data Base'[Value]))

but  when i choose slicer like VPregion or plant . total fyi varation not showing coorect value. i have attached sample file 

 

Sample  

 

 

thanks in advance 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @THENNA_41 

According to your description and sample pbix file, I found that you applied the visual filter on this column chart but you used the ALL() function to get the total value, I think it’s the reason for the incorrect value of the total value, I suggest you to use the ALLSelected() function to get the correct total, you can try to change the measure formula like this:

vrobertqmsft_0-1637115150526.png

Measure selc1 =

IF(SELECTEDVALUE(NewTable[Reduction buckets])="Total FY Variation",CALCULATE(SUM('Master Data Base'[Value]),ALLSELECTED(NewTable[Reduction buckets])),

SUM('Master Data Base'[Value]))

And you can get what you want, like this:

vrobertqmsft_1-1637115150531.png

 

You can download my test pbix file below

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.

View solution in original post

4 REPLIES 4
v-robertq-msft
Community Support
Community Support

Hi, @THENNA_41 

According to your description and sample pbix file, I found that you applied the visual filter on this column chart but you used the ALL() function to get the total value, I think it’s the reason for the incorrect value of the total value, I suggest you to use the ALLSelected() function to get the correct total, you can try to change the measure formula like this:

vrobertqmsft_0-1637115150526.png

Measure selc1 =

IF(SELECTEDVALUE(NewTable[Reduction buckets])="Total FY Variation",CALCULATE(SUM('Master Data Base'[Value]),ALLSELECTED(NewTable[Reduction buckets])),

SUM('Master Data Base'[Value]))

And you can get what you want, like this:

vrobertqmsft_1-1637115150531.png

 

You can download my test pbix file below

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.

@v-robertq-msft  thank you its working . how i will make custom order wise in  above measure. i tired created new table and make the realtioship between two tables  not working. 

1.Overstock consumption

2.New Materials

3.Scrap 

4.Supply Improvements 

5.Sell back to OEM
6.Target 

 

I want to make  above order is there . how i will make this ? please help 

@v-robertq-msft   let me check now 

amitchandak
Super User
Super User

@THENNA_41 ,you should have additional row new table, say for Reduction Buckets, Value

 

that will get automatically get added to values when you use that as measure sum(Table[Value])

 

refer if this old soltion can help

https://community.powerbi.com/t5/Desktop/Grand-Total-in-Bar-Chart/m-p/612631

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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