Forum Discussion
SUMX Date Range and SAMEPERIODLASTYEAR
- 5 years ago
Dalla_Terra , It this moment I am not sure any value add "values" is doing(May be you want add the in grand total and this will do that.
Sumx(Values(Dates[Year]),TOTALYTD(sum('Sales'[Price]),Dates[Date]))
so you can try for last year and check is that can work
Sumx(Values(Dates[Year]),TOTALYTD(sum('Sales'[Price]),dateadd(Dates[Date],-1,year)))
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Dalla_Terra , It this moment I am not sure any value add "values" is doing(May be you want add the in grand total and this will do that.
Sumx(Values(Dates[Year]),TOTALYTD(sum('Sales'[Price]),Dates[Date]))
so you can try for last year and check is that can work
Sumx(Values(Dates[Year]),TOTALYTD(sum('Sales'[Price]),dateadd(Dates[Date],-1,year)))
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA