Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi there
I'm using the SAMEPERIODLASTYEAR-Function. Is there a way to get the year bevor the previous year (2016 YTD + 2015 same period + 2014 same periode)?
Currently in use:
SaleP2YTot = CALCULATE([SaleTot]; SAMEPERIODLASTYEAR('Dates'[Date]))
Thanks for any input & Regards!
Solved! Go to Solution.
According to the documentation:
https://msdn.microsoft.com/en-us/library/ee634972.aspx
The dates returned are the same as the dates returned by this equivalent formula:
DATEADD(dates, -1, year)
So perhaps:
DATEADD(dates, -2, year)
According to the documentation:
https://msdn.microsoft.com/en-us/library/ee634972.aspx
The dates returned are the same as the dates returned by this equivalent formula:
DATEADD(dates, -1, year)
So perhaps:
DATEADD(dates, -2, year)
Thank you smoupre!
SalesP2YTot = CALCULATE([SalesTot]; DATEADD(Dates[Date]; -2; year))
Did not realized that I have to replace the "sameperiodlastyear"-Function. But it's working well.
What about when calculation the cummulative sales total? Can I use the same functionality like as:
CumSalesP2YTot = CALCULATE ( [SalesPYTot]; FILTER ( ALLSELECTED(Dates); 'Dates'[Date] <= DATEADD(Dates[Date]; -1; year) && 'Dates'[Date] <= TODAY() ) )
Regards Patrick
According to the documentation:
https://msdn.microsoft.com/en-us/library/ee634972.aspx
The dates returned are the same as the dates returned by this equivalent formula:
DATEADD(dates, -1, year)
So perhaps:
DATEADD(dates, -2, year)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
99 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |