Forum Discussion
android1
9 years agoPost Patron
SUM values if date equal to
Hi, Trying to SUM the values in column Num Hrs if iDate = 17 Marach 2017. Have this so far -> Bank Hol = CALCULATE(SUM(CarerActualWork[Num Hrs]),CarerActualWork[iDate]= "17 March 2017") b...
android1
9 years agoPost Patron
Hi,
What in this measure could possibly mean that Bank Hol are shown for dates other than 17th March 2017?
Makes no sense to me.
Bank Hol = CALCULATE(SUM(CarerActualWork[Num Hrs]),CarerActualWork[iDate] = DATE(2017,03,17))
Anonymous
9 years agoNot applicable
Hi android1,
If you want to get the sum of the data when date is equall to 03/17/2017, You can use all function to ignore the original filter:
Bank Hol = CALCULATE(SUM(CarerActualWork[Num Hrs]),FILTER(ALL(CarerActualWork),CarerActualWork[iDate] = DATE(2017,03,17)))
Sum of values which has the same date:
Bank Hol = SUMX(FILTER(ALL(CarerActualWork),CarerActualWork[iDate] = MAX(CarerActualWork[iDate])),CarerActualWork[Num Hrs])
Regards,
Xiaoxin Sheng