Forum Discussion
Amymai
7 years agoFrequent Visitor
Sum + DatesInPeriod didn't work.
Hi guys,
I tried to show 3 previous months from the selected month using DatesInPeriod function but it didn't work well.
My measure is:
Total Stock Value last 3 month =
CALCULATE(
Sum('KPI[$ Value SOH]),
CALCULATE(
Sum('KPI[$ Value SOH]),
DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-3, MONTH))
I guess the issue comes from the data but I can't figure out what's wrong with it. Please help!!
Here is pbix file
Thank you!
3 Replies
- Greg_DecklerCommunity Champion
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008- AmymaiFrequent Visitor
Thank you! But I don't think that can be work. I've tried my measure to another database and it's ok. The problem here is I don't understand what's wrong with this data.
- v-chuncz-msftCommunity Support