Forum Discussion
Anonymous
7 years agoNot applicable
SUM by dates
Hello, I need to create a bar chart that SUMS all pump durations based on a single date. Sorting by multiple values on the x-axis of the bar chart would solve my problem, but I dont believ...
TeigeGao
Solution Sage
7 years agoHi Anonymous ,
According to your description, my understanding is that you want to sum the data of day 1 and day 2, in this scenario, we can first create a calculated table with the following DAX query:
Table =
UNION (
SUMMARIZE (
Table1,
Table1[Day 1 Date],
"Total", SUM ( Table1[Day 1 Pump Duration] )
),
SUMMARIZE (
Table1,
Table1[Day 2 Date],
"Total", SUM ( Table1[Day 2 Pump Duration] )
)
)The result will like below:
Then we can drag these two columns to bar chart(I just use some part of the sample data):
Best Regards,
Teige
Anonymous
7 years agoNot applicable
TeigeGao ,
Thankyou very much, your solution worked for me, but I am running into a further issue that I forgot about.
I need to filter/sort by the id. Please see below and thanks for your time.