Forum Discussion
James_Galis1
3 years agoHelper II
Sum max value
Hello Hoping to get some assistance with a measure that adds up the value in the " Free time" column for each given date. I use a date slicer which could show x number of days, weeks etc ...
- 3 years ago
You might try:
SUMX( SUMMARIZE('Table','Table'[Start Date], 'Table'[Free Time]), [Free Time])
eliasayyy
3 years agoMemorable Member
you can use sumx function
sumx(values([date]),max([amount]))
James_Galis1
3 years agoHelper II
Hi
It does not seem to add up correctly
I get a total of 6 when looking at the data above
- eliasayyy3 years agoMemorable Member
do you have multiple employees id?
- James_Galis13 years agoHelper II
Yes. I do have multiple emp ID's associated with the data
Sample dataEmployee Start Date Start Time End Time Free Time Employee ID Emp 1 03/07/2023 7:00:00 AM 08:00:00 2 1678290 Emp 1 03/07/2023 08:30:00 09:30:00 2 1678290 Emp 1 03/07/2023 10:00:00 11:30:00 2 1678290 Emp 1 03/07/2023 11:45:00 13:45:00 2 1678290 Emp 1 03/07/2023 14:30:00 16:30:00 2 1678290 Emp 1 04/07/2023 8:30:00 AM 09:30:00 1.5 1678290 Emp 1 04/07/2023 09:45:00 10:45:00 1.5 1678290 Emp 1 04/07/2023 11:15:00 12:45:00 1.5 1678290 Emp 1 04/07/2023 13:00:00 14:00:00 1.5 1678290 Emp 1 04/07/2023 14:30:00 16:30:00 1.5 1678290 Emp 1 05/07/2023 08:30:00 09:30:00 1.75 1678290 Emp 1 05/07/2023 10:00:00 11:00:00 1.75 1678290 Emp 1 05/07/2023 11:30:00 AM 13:30:00 1.75 1678290 Emp 1 05/07/2023 14:00:00 15:30:00 1.75 1678290 Emp 1 05/07/2023 15:45:00 17:45:00 1.75 1678290 Emp 2 04/07/2023 08:00:00 09:00:00 4 2546973 Emp 2 04/07/2023 9:00:00 AM 10:00:00 4 2546973 Emp 2 04/07/2023 14:00:00 15:00:00 4 2546973 Emp 2 05/07/2023 13:30:00 15:30:00 0 2546973 Emp 3 05/07/2023 10:00:00 12:00:00 2.5 3753414 Emp 3 05/07/2023 14:30:00 14:45:00 2.5 3753414 - eliasayyy3 years agoMemorable Member
please try
Breaks = SUMX(VALUES('Table'[Start Date]) , CALCULATE(MAX('Table'[Free Time]),ALLEXCEPT('Table','Table'[Start Date],'Table'[Employee ])))