Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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))
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 11 | |
| 10 | |
| 8 |