Forum Discussion
Previous day cost...
Hey there...
I'm looking for a dax measure that brings me the sum of my costs of the previous day in relation with the current day, and also that changes according to the day.
Thanks in advanced
Okay, than use this part...
PREV_DAY = CALCULATE(SUM('Table'[Value]); DATEADD('Date'[Date]; -1; DAY))
... and filter the date on today (relative date filter)Yesterday = CALCULATE(SUM('Table'[Value]), 'Date'[Date] = TODAY()-1)
5 Replies
- mwegener
Most Valuable Professional
Hi Anonymous
look at this
Value DoD% = VAR __PREV_DAY = CALCULATE(SUM('Table'[Value]); DATEADD('Date'[Date]; -1; DAY)) RETURN DIVIDE(SUM('Table'[Value]) - __PREV_DAY; __PREV_DAY)If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
- AnonymousNot applicable
Thank you but i'm not looking a % numer, I just want to calculate the sum of my cost of yesterday day.
- mwegener
Most Valuable Professional
Okay, than use this part...
PREV_DAY = CALCULATE(SUM('Table'[Value]); DATEADD('Date'[Date]; -1; DAY))
... and filter the date on today (relative date filter)