Forum Discussion
Dax with dates filter not working
Hi all,
I'm trying to create a measure to calculate between 2 dates and for specific companies but the following is not working. Any help would be much appreciated!
CALCULATE(
SUM('vbi_POStatus 2019-2021'[AmtOrdered]),
'vbi_POStatus 2019-2021'[PODate] > 12/31/2018,
'vbi_POStatus 2019-2021'[PODate] < 1/1/2020,
'vbi_POStatus 2019-2021'[Supplier] = "ABC Supply West",
'vbi_POStatus 2019-2021'[Supplier] = "ABC Supply East"
)
Helpful_Fun4848 Oh, duh:
SUMX(FILTER(ALL('vbi_POStatus 2019-2021'),[PODate] > DATE(2018,12,31) && [PODate] < DATE(2020,1,1) && ([Supplier] = "ABC Supply West")), [AmtOrdered] )
7 Replies
- Greg_Deckler
Community Champion
Helpful_Fun4848 Perhaps try:
SUMX( FILTER('vbi_POStatus 2019-2021',[PODate] > 12/31/2018 && [PODate] < 1/1/2020 && ([Supplier] = "ABC Supply West" || [Supplier] = "ABC Supply East")), [AmtOrdered] )- Helpful_Fun4848
Helper III
Greg_Deckler I tried, but it gave me a blank result. I tried with one company but I don't think that should create a problem
SUMX(FILTER('vbi_POStatus 2019-2021',[PODate] > 12/31/2018 && [PODate] < 1/1/2020 && ([Supplier] = "ABC Supply West")),
[AmtOrdered]
)- Greg_Deckler
Community Champion
Helpful_Fun4848 Probably a context issue, try:
SUMX(FILTER(ALL('vbi_POStatus 2019-2021'),[PODate] > 12/31/2018 && [PODate] < 1/1/2020 && ([Supplier] = "ABC Supply West")), [AmtOrdered] )