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..!!😊
Hi rohit1991 ,
Thanks for the quick reply but that is my requirement , i need to keep date field on the x-axis.
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.- amitchandak8 months agoSuper User
prasadpatil020 , Is this column [Tot. Service Value Gross] is used as "not summarised:? , because otherwise all Fridays should merge unless you have any other column in the visual
What is used in visual, what you want to ignore
I want to ignore all visual filter context
Calculate(SUM('Order Level Details'[Tot. Service Value Gross]), allselected())
I want to ignore all filter context
Calculate(SUM('Order Level Details'[Tot. Service Value Gross]), all())
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- prasadpatil0208 months agoHelper I
Hi amitchandak
FYI,Just i need total of service value.
my Dax =CALCULATE(SUM('Order Level Details'[Tot. Service Value Gross]),ALLSELECTED('Calendar Dimension'))
I need filters should work so i have used ALLSELECTED.
If i use above dax then its showing total of all the service around one year, it should work on date filter from the slicer which is not happening. I want to use this calcualtion in column chart.
Calendar table and order level table are connected via calendar_sk and relation is one-many, single direction
Order numbers are duplicated hence resulting in wrong output, but if i pull Tot. Service Value Gross column directly in the table visual then its working fine but giving wrong result if i create measure.