Forum Discussion
LY YTD Sales - Fiscal
Hi,
I am having trouble calculating the YTD(fiscal year) sales for LY. I have tried several solutions found here in the community, but all of them just results in a blank result.
I have calculated the YTD sales for TY by using the following formula:
- Anonymous5 years ago
I think I might have solved it using the following formula
LYYTD = CALCULATE(SUM('Sales'[Sales]),DATESBETWEEN('Sales'[Date],"1/7/2019",DATE(YEAR(NOW())-1,MONTH(NOW()),DAY(NOW()))))
4 Replies
- amitchandak
Super User
Anonymous , Try like these example. I am hoping [Sales 2020/21] does not have any year filter
it should sales , example
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"6/30"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"6/30"))Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a- AnonymousNot applicable
Unfortunately, the Last YTD Sales formula just gives me total of the entire fiscal year...
- AnonymousNot applicable
My mistake - my description of my problem was not adequate i realize....
I want the LY YTD ending today last year - if that makes sense.
So I've got TY YTD (which is just the total sales. no need to make a new measure) - from 1/7/2020 until Today.
Then i need LY YTD running from 1/7/2019 until Today-1year. 🙂
- AnonymousNot applicable
I think I might have solved it using the following formula
LYYTD = CALCULATE(SUM('Sales'[Sales]),DATESBETWEEN('Sales'[Date],"1/7/2019",DATE(YEAR(NOW())-1,MONTH(NOW()),DAY(NOW()))))