Forum Discussion
SUM function doing wrongly calculation
- 8 months ago
Hi All, Thank you so much for all your inputs and suggestions, my issue has been resolved by simple SUM fucntion, issue was in the data not in the DAX.
Once again thank you so much for your kind help..!!😊
Hii prasadpatil020
The SUM function is not calculating wrongly it’s working row by row because your measure is evaluated at the day level, and each row already contains the final value for that day. When you place Day on the axis, Power BI shows the measure per day, but when you put it in a column chart, the measure still returns the per-day value instead of the total. To get the full total across all days, you must create a measure like Total Service = SUM(‘OrderTable’[Tot Service Value Gross]) and use that in the visual without Day on the axis. If you keep Day on the axis, Power BI will always show the daily value, not the grand total.
- prasadpatil0208 months agoHelper I
Hi rohit1991 ,
Thanks for the quick reply but that is my requirement , i need to keep date field on the x-axis.- rohit19918 months agoSuper User
Hii prasadpatil020
If you must keep the Date on the x-axis, then the SUM will always show the daily value, not the total. In that case you need a separate measure that ignores the day context, for example:
Total Service (Ignore Date) = CALCULATE(SUM('OrderTable'[Tot Service Value Gross]), ALL('Calendar')).
This removes the day filter so the column chart will show the full total even when Date is on the axis.- prasadpatil0208 months agoHelper I
Hi rohit1991
After using your shared DAX.