Forum Discussion
Compare inventory yesterday vs. eom
CesiCash to calculate last day for previous month use
calculate(sum(inventory), LASTDATE ( PREVIOUSMONTH ([Date])))
calculate(sum(inventory), PREVIOUSDAY ([Date]))
you can compare them with if and then output the result
Hi Anonymous
Thank you for response.
Unfortunately it doesnt work.
I was able to calculate a column for Yesteraday inventory:
Inventory Yesterday = CALCULATE(SUM('Product'[Trial]),'Previous Date')
But i could not make the second column for Last Month value:
Inventory EOM = CALCULATE(SUM('Product'[Trial]),LASTDATE(PREVIOUSMONTH(Datetable[Date].[Date])))
It always tells me "A circular dependency was detected: Product[Inventory EOM], Product[Inventory Yesterday], Product[Inventory EOM]."
What did I do wrong?
Best
Carina
- Anonymous8 years agoNot applicable
CesiCash you are creating them as columns I am guessing, you need to create measures.
- CesiCash8 years agoRegular Visitor
Hi Anonymous,
So i calculated both as measure, but still i get just blank values for the inventory of last month.
Thats how my calculation looks like: EOM = CALCULATE(SUM('Product'[Trial]),LASTDATE(PREVIOUSMONTH(Datetable[Date].[Date])))
Best
Carina
- Anonymous8 years agoNot applicable
CesiCash can you plz share your power bi file?