Forum Discussion
Incorrect total in bar chart
Hi everyone,
We have a bar chart like:
The Total Data Label is showing a SUM of the values, however, if we change the chart type to Matrix, we see this:
Which is what we are actually expecting to see. The measure run against the total of both categories, instead of a sum of two categories.
Is it possible to have the total label show what we expect? or is there a work around that we could use?
Thanks!
Hi Anonymous
You can create a measure as:
Total = VAR __table = SUMMARIZE('Table1',[Teanologia],"_value",sum(values)) RETURN IF(HASONEVALUE(Table1[Teanologia]),sum(values),SUMX(__table,[_value]))Best Regards,
LinkIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- HashamNiazSolution Sage
Hi !
Try putting the same measure for secondary axis. Use [Line & Stack Column] chart, and put the same measure for both primary & secondary Y-axis value. Primary axis will show data based on Technologia information, while seconday axis will show overall value. You can hide the secondary axis lin & only show data values.Hope this will resolve the issue.
Regards,
Hasham
- v-xulin-mstfCommunity Support
Hi Anonymous
You can create a measure as:
Total = VAR __table = SUMMARIZE('Table1',[Teanologia],"_value",sum(values)) RETURN IF(HASONEVALUE(Table1[Teanologia]),sum(values),SUMX(__table,[_value]))Best Regards,
LinkIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- Sandeep_PowerBIFrequent Visitor
Hi Team,
I am getting incorrect values in Bar chart. Earlier same incorrect totals are showing in matrix visual then have written HasoneValue Dax with SUMX and corrected. Now i am getting values error in Bar chart... In tooltip it showing correct value but data label showing wrong value. How to correct it? Attahced screenshot for reference...
When i am changing the slicer, as per table visual its correct but bar chart showing all incorrect values data lable. but if i take cursor on bar it hover showing right values... Feb - correct value is 0.03 but in bar its showing 0.028
Thank in advace!
Sandeep