March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am struggling with creating the formula for YTD prior year that cumulates based on current YTD.
My Current YTD Sales formula is working:
YTD Sales = [Total Sales]( FILTER( ALL(FYCalendar), FYCalendar[FY Week Nbr]<=MAX(FYCalendar[FY Week Nbr]) ), VALUES(FYCalendar[FY]) )
When I try to create the formula for Prior YTD Sales, I receive an error:
YTD Sales Prior Year = [Total Sales], FILTER(ALL(FYCalendar), FYCalendar[FY Week Nbr]=MAX(FYCalendar[FY Week Nbr]) - 1), VALUES(FYCalendar[FY]) )
How do I fix the prior year expression for YTD based only on time accumulated for the current YTD?
Thanks so much if you can assist!
Hi @AmberM,
Could you please share us more information about your report if possible? Like your source table structure and some sample data with corresponding expected result. So that we can know the right direction and make some proper tests.
Thanks,
Xi Jin.
Here is a sample file on OneDrive with a few iterations of trying to create YTD Sales that accumulate for the prior year. Please let me know if you have issues accessing the file, and thank you for your assistance!
Hi,
In the Sales Table, you do not have a date column - only a Week column. In the source from where you are downloaidng, do you have a Date column? If not a date colun, even if you have month and year in 2 seperate columns, we can always generate a date.
Having a date column will allow us to use DAX's Date and Time Intelligence functions.
Unfortunately that is my issue. The data only returns with a fiscal YYYYWW which does not match a calendar year. I am not able to use DAX calculations to create the prior year expressions.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
86 | |
77 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |