The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 calendar table and I have to use DAX to create that relationship. that is the first part of the function. When I add the second part it does not return any values. the dispdate is a short date format.
No errors but no results either.
What am I getting wrong?
Solved! Go to Solution.
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:)
Hi @MONA4980 ,
Just wanted to check if you were able to resolve the issue?
If you need any help, feel free to reach out.
Thanks @MasonMA and @Greg_Deckler for your inputs.
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:)
Thank you for the quick reply. I clicked on your first link, time inteligence, and it did not work.
I will check out the "hard way"
@MONA4980 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-TIT...