Forum Discussion
Anonymous
2 years agoNot applicable
Line chart data comparison for year over year
Hi Everyone,I'm using the below measure as a date picker slicer. Now I need to show year-over-year (2021–2023) revenue in a line chart. If I select last week from the date picker slicer, then all thr...
amitchandak
Super User
2 years agoAnonymous , if you need based on today
This year Today =
var _min = eomonth(today(),-1*month(today()))+1
var _max = eomonth(_min,12 -1*month(today()) )
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
Last year Today =
var _max = eomonth(today(),-1*month(today()))
var _min = eomonth(_max,-12)+1
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
I think for the current year use only
Revenue Current Year = SUM(RevenueBooked[Revenue])
Revenue PREVIOUSYEAR = CALCULATE( SUM(RevenueBooked[Revenue]), SAMEPERIODLASTYEAR('Date'[Date]) )