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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Showing the Total Value in a Line and Stacked Column Chart with legend

Is there any possibility of Showing the Total Value in a Line and Stacked Column Chart with legend?Total missing.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Normally we can use ALLEXCEPT() function to calculate the sum value but the measure can't be added to Column values field in a Line and Stacked Column Chart since we can only add one column to Column values field.

A workaround is to create a calculated table contains values for each legend and sum value in a same column.

For example:

 

Table 2 = UNION('Table',DISTINCT(SELECTCOLUMNS('Table',"date",'Table'[date],"type","sum","value",CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[date])))))

 

3.PNG4.PNG

After that we can use table2 to create the visual we want.

5.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

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

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 

Normally we can use ALLEXCEPT() function to calculate the sum value but the measure can't be added to Column values field in a Line and Stacked Column Chart since we can only add one column to Column values field.

A workaround is to create a calculated table contains values for each legend and sum value in a same column.

For example:

 

Table 2 = UNION('Table',DISTINCT(SELECTCOLUMNS('Table',"date",'Table'[date],"type","sum","value",CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[date])))))

 

3.PNG4.PNG

After that we can use table2 to create the visual we want.

5.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

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

 

amitchandak
Super User
Super User

@Anonymous 

For the one used a legend try to a measure like

Measure = Calculate ([Measure],All(Dimesnion1))

 

Refer:https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept/

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
Greg_Deckler
Community Champion
Community Champion

So like the total of each column or the total of all columns or ?


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler ,

Need to display total of each column. If it is only the Stacked column chart , I believe that is possible. But how to implement in a Line and Stacked column chart, Any Idea?

Well, you could add another line that would do an ALLEXCEPT for your Date/Month. Then you could potentially do a data label on that to show the total. I am assuming that is what you are after, a data lable that shows the total, correct?

 

Really just depends on what your data looks like, you might be able to just add the column with a default aggregation to the line values area.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors