Forum Discussion
brendan_w
Advocate I
8 years agoWhat if Parameter - altering report date error?
Hi, So I have the following DAX which works perfectly: Daily Tonnage = CALCULATE( [Tonne Food Received], 'Monthly Data'[Date] > TODAY() - 1) This calculates the tonnage received on today's d...
- 8 years ago
Hi,
Try this
=CALCULATE( [Tonne Food Received], FILTER('Monthly Data','Monthly Data'[Date] > TODAY() - 'Days Previous'[Days Previous Value] - 1))
Does this work?
brendan_w
Advocate I
8 years agoThanks Ashish, that did the job! Out of curiosity, what is different between the Filter function and the filter argument within Calculate? I've a vague recollection of reading somewhere that they result in the same functionality. Clearly this is not the case or else the code for Calculate has yet to be updated.
Ashish_Mathur
Super User
8 years agoHi,
You are welcome. The reason we need to use the FILTER() function is that yours is a case of rich filtering i.e. comparing a column to a measure. The measure being TODAY().