Forum Discussion
half an hour sum
Thanks Anonymous , for your reply. I want to sum up the result value if it happens in the same half an hour value. For example, if you look at the picuture, among top 5 rows, 4 of them happened in the same half hour time (i.e. 11.30 pm) so I want to add result column of those 4 rows. Does that make sense?
Please try these expressions instead.
New Result =
CALCULATE (
SUMX (
'Customer Information',
'Customer Information'[NumberOfConsumers] * 'Customer Information'[Time Spent]
),
'Customer Information'[Time Spent] > 1,
'Customer Information'[NumberOfConsumers] > 1
)
Sum 30 =
SUMX (
SUMMARIZE ( 'Customer Information', Dates[Date], Times[Half Hour] ),
[New Result]
)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- Dunner20206 years ago
Post Prodigy
Hi mahoneypat ,
It did not produce the desired result. When I used the formula you mentioned, it produced following output:
- mahoneypat6 years ago
Microsoft Employee
Try just putting the Sum 30 measure only in the visual. I get this result (same values on all 4 rows of 2/4/2020 and 11:30 PM).
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
- Dunner20206 years ago
Post Prodigy
Hi mahoneypat ,
Why did you create a new measure for the 'Result'? Sum 30 did not work with the measure I created for calculating Result. I am interesting in calling measures as filter while calculating result because I have 8 to 9 different conditions that I wanted to check.