The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Is there any possibility of Showing the Total Value in a Line and Stacked Column Chart with legend?
Solved! Go to Solution.
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])))))
After that we can use table2 to create the visual we want.
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.
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])))))
After that we can use table2 to create the visual we want.
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.
@Anonymous
For the one used a legend try to a measure like
Measure = Calculate ([Measure],All(Dimesnion1))
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.