Forum Discussion

moesteez's avatar
moesteez
Helper I
5 years ago
Solved

SUM quantity on a specific date

Im having a really hard time with a relaly basic measure but I cant figure out what Im doing wrong.

 

Ive got a quantity measure that sums a quantity column that works fine

I have a calendar table joined correctly to my sales table which works fine with any other measure and slicer

 

But Im trying to write a measure to just tell me the quantity for a specific date. Ive tried:

 

CALCULATE([Quantity], FILTER('Calendar', 'Calendar'[Date] = 07/07/2021))

and

CALCULATE([Quantity], FILTER('Calendar', 'Calendar'[Date] = DATE(07, 07, 2021) ) )
and

CALCULATE([Quantity], FILTER('Calendar', 'Calendar'[Date] >= 07/07/2021), FILTER('Calendar', 'Calendar'[Date] < 08/07/2021) )

and

CALCULATE([Quantity], FILTERS('Calendar'[Date]), 'Calendar'[Date] = 07/07/2021)

and

CALCULATE([Quantity], FILTERS('Calendar'[Date]), 'Calendar'[Date] >= 07/07/2021, 'Calendar'[Date] < 08/07/2021)

and

CALCULATE([Quantity], 'Calendar'[Date] = 07/07/2021)

 

Everything is returning me a blank value. Its such a simple measure but I cant figure out whats going on. Am I doing something wrong here?

 

Thanks for your help

  • moesteez,

     

    Try this measure. You had the argument order wrong in the DATE function.

     

    Measure =
    CALCULATE ( [Quantity], 'Calendar'[Date] = DATE ( 2021, 07, 07 ) )

     

1 Reply

  • moesteez,

     

    Try this measure. You had the argument order wrong in the DATE function.

     

    Measure =
    CALCULATE ( [Quantity], 'Calendar'[Date] = DATE ( 2021, 07, 07 ) )