Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hey,
I am trying to create a KPI card on my dashboard and want my reference year (within the trend field) to always compare my current year to 2019 sales. So whatever year I filter my dashboard by, it should always compare my sales to 2019.
Right now, I have it set as
Revenue Period 2019 = CALCULATE((SUM(transactions[Total]) - SUM(transactions[Total_Tax])), PARALLELPERIOD(filter_date[Date], -3, YEAR))
This works when I set my filters to the year 2022 and it compares it to 2019, but when I change by filter to 2021, it begins comparing to the 2018 period.
I also tried this method,
Revenue Period 2019 =
var _diff = 2019 - maxx(allselected('Date'), 'filter_date'[Year]) )
return
CALCULATE((SUM(transactions[Total]) - SUM(transactions[Total_Tax])), PARALLELPERIOD(filter_date[Date], _diff, YEAR))
But this doesn't work for me either.
Any help on this will be very appreciated.
Solved! Go to Solution.
@aayush_a , Also use date from date table in the measure
Revenue Period 2019 =
var _diff = 2019 - maxx(allselected('Date'), 'Date'[Year]) )
return
CALCULATE((SUM(transactions[Total]) - SUM(transactions[Total_Tax])), PARALLELPERIOD(Date[Date], -3, YEAR))
or
Revenue Period 2019 =
var _diff = 2019 - maxx(allselected('Date'), 'Date'[Year]) )
return
CALCULATE((SUM(transactions[Total]) - SUM(transactions[Total_Tax])), dateadd(Date[Date], -3, YEAR))
@aayush_a , Also use date from date table in the measure
Revenue Period 2019 =
var _diff = 2019 - maxx(allselected('Date'), 'Date'[Year]) )
return
CALCULATE((SUM(transactions[Total]) - SUM(transactions[Total_Tax])), PARALLELPERIOD(Date[Date], -3, YEAR))
or
Revenue Period 2019 =
var _diff = 2019 - maxx(allselected('Date'), 'Date'[Year]) )
return
CALCULATE((SUM(transactions[Total]) - SUM(transactions[Total_Tax])), dateadd(Date[Date], -3, YEAR))