Forum Discussion
MONA4980
1 year agoFrequent Visitor
LAST MONTHS SALES
Hello, I am really new to Power BI and DAX. I am trying to get MOM data and have to first get my profit from last month. Before I throw it out there know that I have a table that uses the calenda...
- 1 year ago
Hi,
1. Mark your calendar table as Date table.
2. Use time-based functions like 'PARALLELPERIOD' on your Calendar table.That said, update your Measure to,
LAST MONTH PROFIT =
CALCULATE(
SUM('ORDERS'[PROFIT]),
USERELATIONSHIP('Calendar'[Date], 'ORDERS'[DISPDATE]),
PARALLELPERIOD('Calendar'[Date], -1, MONTH)
)Hope this works for you:)
Greg_Deckler
Community Champion
1 year agoMONA4980 You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
Also, 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