Forum Discussion
Lino
8 years agoFrequent Visitor
Current Year vs Previous Year
Hello everyone I have a table that contains two fields: Date Amount This table contains data of 2016, 2017 and 2018. My scope is creating a measure called Amount PY using DAX. For ...
- 8 years ago
You must use SAMEPERIODLASTYEAR() instead of PREVIOUSUEAR(), because the last one returns ALL dates from the last year, and you need the same day shifted one year back (Using SAMEPERIODLASTYEAR()).
Regards!
Anonymous
7 years agoNot applicable
Hi,
I have a list of 5 State Financial years ranging from 2013 to 2018. I am able to calculate difference between two consecutive years(2017,2018) and difference between current year 2018 with any previous year but not able to calculate difference for previous years like (2015,2017) or (2016, 2014)
The DAX functions I used here are: YTD= Total YTD([Value], (Date), “6/30”)
PYTD = Calculate([YTD], Datesbetween(Date), Date(2013,7,1), Date(2017,6,30)))
Can someone assist me here? Thanks!