Forum Discussion
YOY Calculation not giving desired result
I am trying to calculate YOY sales. For my previous year revenue. I am using the following code:
- Anonymous6 years ago
My apologies. The calculation actually works. I just needed to graph them against the dates to show the data that I wanted.
3 Replies
- Ashish_Mathur
Super User
Hi,
Share some data and show the expected result.
- amitchandak
Super User
Do you continous dates.
Try something like this
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date Filer]))) Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date Filer],-1,Year)))Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601 - AnonymousNot applicable
My apologies. The calculation actually works. I just needed to graph them against the dates to show the data that I wanted.