Forum Discussion

cottrera's avatar
cottrera
Post Prodigy
6 years ago
Solved

Datesbetween not working

Hi 

 

I have two tables a repairs spend table and a dates table I would like to working out the spend between two dates. I have already summed the spend using Dax this measure is called 'Spend' how ever my dates between measure below is not working to results are showing no data

 

April jobs = CALCULATE([Spend], DATESBETWEEN( 'SHARED Calendar'[PKDate],
DATE(06 ,04 ,2020), DATE(03 , 05 , 2020)))
 
Can anyone advice what I am doing wrong.
 
thanks you
 
Richard
  • I think date format should be

    DATE(<year>, <month>, <day>)

    Is there an error from your formula?

  • cottrera ,

    Your formula seems right except for the DATE format.

    April jobs = CALCULATE([Spend], DATESBETWEEN( 'SHARED Calendar'[PKDate],
    DATE(2020,04 ,06), DATE(2020 , 05 , 02)))
     
     

2 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    I think date format should be

    DATE(<year>, <month>, <day>)

    Is there an error from your formula?

  • cottrera ,

    Your formula seems right except for the DATE format.

    April jobs = CALCULATE([Spend], DATESBETWEEN( 'SHARED Calendar'[PKDate],
    DATE(2020,04 ,06), DATE(2020 , 05 , 02)))