anvg
Active Member
- Joined
- Feb 14, 2012
- Messages
- 485
My question grows from frognz's topic "Returning last date and date before the last". I know about CALCULATE function which "wraps" a filter argument in it
For example
=CALCULATE(SUM('sales', 'sales'[Qty]<36)
is really calculated as
=CALCULATE(SUM('sales', FILTER(ALL('sales'[Qty]),'sales'[Qty]<36))
If I understood Matt Allington's answer on that topic problem right it is happend because FILTER function wraps the LastSaleDate measure into CALCULATE function
Instead
CALCULATE(MAX('sales'[TranDate]),FILTER('sales', 'sales'[TranDate]<[LastSaleDate))
is really calculated
CALCULATE(MAX('sales'[TranDate]),
FILTER('sales', 'sales'[TranDate]< CALCULATE([LastSaleDate]))
)<calculate([lastsaledate])))<calculate(lastsaledate)))
<calculate(<strong><calculate([lastsaledate])))[ code]
Are there other DAX functions that are computed not exactly as recorded (they have background wrap)?
Regards,</calculate([lastsaledate])))[></calculate(<strong></calculate([lastsaledate])))<calculate(lastsaledate)))
For example
=CALCULATE(SUM('sales', 'sales'[Qty]<36)
is really calculated as
=CALCULATE(SUM('sales', FILTER(ALL('sales'[Qty]),'sales'[Qty]<36))
If I understood Matt Allington's answer on that topic problem right it is happend because FILTER function wraps the LastSaleDate measure into CALCULATE function
Instead
CALCULATE(MAX('sales'[TranDate]),FILTER('sales', 'sales'[TranDate]<[LastSaleDate))
is really calculated
CALCULATE(MAX('sales'[TranDate]),
FILTER('sales', 'sales'[TranDate]< CALCULATE([LastSaleDate]))
)<calculate([lastsaledate])))<calculate(lastsaledate)))
<calculate(<strong><calculate([lastsaledate])))[ code]
Are there other DAX functions that are computed not exactly as recorded (they have background wrap)?
Regards,</calculate([lastsaledate])))[></calculate(<strong></calculate([lastsaledate])))<calculate(lastsaledate)))
Last edited: