Forum Discussion

android1's avatar
android1
Post Patron
9 years ago

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")

 

but not quite right.

 

Gerry

8 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    Hi android1

     

    Please try this slight variation

     

    Bank Hol = CALCULATE(
    			SUM(CarerActualWork[Num Hrs]),
    			CarerActualWork[iDate]= DATE(2017,3,17)
    			)
    • android1's avatar
      android1
      Post Patron

      Hi Phil,

       

      Hi Phil, Thanks for that. For some reason it's summing for all dates.

      • Phil_Seamark's avatar
        Phil_Seamark
        Microsoft Employee

        Hi android1

         

        Any chance you can mock up your expected result for that dataset?

         

        Cheers,

         

        Phil