Forum Discussion
learning_dax
Helper II
4 years agoYTD TOTALS Comparisons
Hey all, I'm trying to compare FISCAL YTD as of this week compared to the FISCAL YTD of last week, basically showing growth rate instead of raw WoW analysis (which I've built a matrix for). For i...
ValtteriN
Community Champion
4 years agoHi,
One easier way to calculated fiscal YTD is to utilize the second parameter in DATESYTD. E.g. CALCULATE([Measure],DATESYTD('Calendar'[Date],"03/31")) will use 31.3. as the year end date.
To calculate lastweek value you can create a variable like this:
var weeknumLW = WEEKNUM(MAX('Table'[Date]))-1 return
The you can utilize it for example like this:
var weeknumLW = WEEKNUM(MAX('Table'[Date]))-1
return
CALCULATE([YTD measure],ALL('Table'[Date]),WEEKNUM('Table'[Date])=weeknumLW,)
I think you can solve you the problem byt utilizing these tricks. Ping me with @ if you have questions/problems.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
The you can utilize it for example like this:
var weeknumLW = WEEKNUM(MAX('Table'[Date]))-1
return
CALCULATE([YTD measure],ALL('Table'[Date]),WEEKNUM('Table'[Date])=weeknumLW,)
I think you can solve you the problem byt utilizing these tricks. Ping me with @ if you have questions/problems.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/