Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, I have the following dataset:
I have a monthly home sales data and have managed to computed the %YoY change by creating another measure (Prev_Total Home Sales) using the following DAX Formula:
Yearly data
Yearly data obtained by selecting "Year" in the Date hierachy.
Solved! Go to Solution.
Hi @pey ,
I create a date table, and a relationship between Dates table and Housing table.
Dates = CALENDAR(DATE(2015,1,1), DATE(2017,12,31))
The use the following measure:
Prev_Total Home sales =
CALCULATE(
[Total home sales _measure],
ALL(Dates),
DATEADD( Dates[Date], -1, year )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It works perfectly now! Thank you so much!
That's strange. How do you calculate the [Total home sales _measure] measure?
You can try the following fomulas (all are measures)
YTD = CALCULATE(SUM(Table[Sales]),DATESYTD(Housing[Date]))
YTD LY = CALCULATE(Table[YTD],SAMEPERIODLASTYEAR(Housing[Date]))
Measure = ([YTD] - [YTD LY]) / [YTD LY]
Thanks for the prompt response.
Can you share the workspace with us? Mask any sensitive data
Do you use a Calendar Date table? I believe the issue has to do with dates not being continuous in the dataset.
Trying adding a Calendar table, join it with the main table on date field, and instead of using Housing_Date in formulas .. use the Calendar date instead
Hi,
Can you try the following link:
Let me know if you have any issue accessing the link. I am having administrative issue with the "publishto public" option..
Hi @pey ,
I create a date table, and a relationship between Dates table and Housing table.
Dates = CALENDAR(DATE(2015,1,1), DATE(2017,12,31))
The use the following measure:
Prev_Total Home sales =
CALCULATE(
[Total home sales _measure],
ALL(Dates),
DATEADD( Dates[Date], -1, year )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.