Forum Discussion
FStettler
6 years agoHelper I
Comparing 2 dates not working
Hi guys! I'm stuck in a very (apparently) simple but deadend problem. I have a table f-PICK UPS where transactions are recorded within, where recording date is one of the main fields I want t...
parry2k
6 years agoSuper User
FStettler ok in that case try this
Prev Day =
VAR __prevDate = CALCULATE ( MAX ( TransactionTable[Date] ), FILTER ( ALL ( DateTable[Date] ), DateTable[Date] < MAX ( DateTabble[Date] ) ) )
RETURN
CALCULATE ( SUM ( Table[Amount] ), DateTable[Date] = __prevDate )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
FStettler
6 years agoHelper I
parry2k thanks again for your swift reply.
I've modified everything taking dimension date table in. But I get this message when running then CALCULATE function
A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
Thanks