Forum Discussion
YOY Growth Comparison tips
Hii community,
I was working on showing growth over last year i have past 5 years of data dumbed into my db
this was my calendar table
Please note my Fiscal Year lies Between april to march
this is my last year measure
and this is the growth %
Growth % =
VAR CY=
[Total Sales Value in Cr FSM]
VAR LY = CALCULATE(
[Total Sales Value in Cr FSM],
SAMEPERIODLASTYEAR('Calendar (P1)'[Date])
)
VAR CHECK = CY <> BLANK()&& LY <> BLANK()
RETURN
IF(CHECK,DIVIDE(CY,LY)-1 )
the thing here is i wanto focus on multiple metrics for growth comparison like Year, Country(this year,last year), similarly for Location code etc..
What my nuances is I.m expecting the comparison need to be done for the current set of period i.e April-August till now this year and the same period last year but in my case i think it is taking the entire year and i'm not sure that whether the fiscal logic is working fine thogh?
GanesaMoorthyGM Is there a reason you're using so many different functions for the time intelligence? Have you marked your date table as a date table? I always try to use DATEADD function as it's very versatile and then I only need to learn one function: https://www.sqlbi.com/articles/differences-between-dateadd-and-parallelperiod-in-dax/
If you don't have a filter context limiting the current period to 'last x months' or 'on or before today' or similar, then when you shift to 1 year ago, it also won't have that filter. So you'll be comparing the partial year this year with a full year last year. To overcome this you need to add a filter for on or before today, either within your measure or at the report level (depends what you want the graphs to do for forcasting).
4 Replies
- v-lgarikapatCommunity Support
Hi GanesaMoorthyGM ,
Thanks for reaching out to the Microsoft fabric community forum.
Thanks for your prompt response
I wanted to follow up and confirm whether you’ve had the opportunity to review the information provided by AllisonKennedy . If you have any questions or need further clarification, please don’t hesitate to reach out.
We appreciate your collaboration and support!
Best regards,
Lakshmi.- v-lgarikapatCommunity Support
Hi GanesaMoorthyGM ,
We’d like to confirm whether your issue has been successfully resolved. If you still have any questions or need further assistance, please don’t hesitate to reach out. We’re more than happy to continue supporting you.
We appreciate your engagement and thank you for being an active part of the community.
Best Regards,
Lakshmi.- v-lgarikapatCommunity Support
Hi GanesaMoorthyGM ,
We’d like to confirm whether your issue has been successfully resolved. If you still have any questions or need further assistance, please don’t hesitate to reach out. We’re more than happy to continue supporting you.
We appreciate your engagement and thank you for being an active part of the community.
Best Regards,
Lakshmi.
- AllisonKennedyCommunity Champion
GanesaMoorthyGM Is there a reason you're using so many different functions for the time intelligence? Have you marked your date table as a date table? I always try to use DATEADD function as it's very versatile and then I only need to learn one function: https://www.sqlbi.com/articles/differences-between-dateadd-and-parallelperiod-in-dax/
If you don't have a filter context limiting the current period to 'last x months' or 'on or before today' or similar, then when you shift to 1 year ago, it also won't have that filter. So you'll be comparing the partial year this year with a full year last year. To overcome this you need to add a filter for on or before today, either within your measure or at the report level (depends what you want the graphs to do for forcasting).