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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am trying to find the % difference e.g. change in consumption between 2021 and 2020 then 2022 and 2021:
This is not a calculated column so can be edited in Power Query editor
Thanks!
Solved! Go to Solution.
Hi, @kadekwijaya
You can try the following methods.
Measure:
Change% =
Var _Previousyear=CALCULATE(SUM('Table'[Consumption]),FILTER(ALL('Table'),[Year]=SELECTEDVALUE('Table'[Year])-1))
Var _Currentyear=SUM('Table'[Consumption])
Return
IF(_Previousyear=BLANK(),BLANK(),DIVIDE(_Currentyear-_Previousyear,_Currentyear))
Column =
Var _Previousyear=CALCULATE(SUM('Table'[Consumption]),FILTER('Table',[Year]=EARLIER('Table'[Year])-1))
Var _Currentyear=[Consumption]
Return
IF(_Previousyear=BLANK(),BLANK(),DIVIDE(_Currentyear-_Previousyear,_Currentyear))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi @kadekwijaya
you want a solution in PQ?
With DAX, try plot a visual with Year column and a measure like:
Thanks for the suggestion!
I would ideally like a table showing the change in consumption as a % between each year?
E.g. 2020 will be blank but 2021 and 2022 will have % values?
Hi, @kadekwijaya
You can try the following methods.
Measure:
Change% =
Var _Previousyear=CALCULATE(SUM('Table'[Consumption]),FILTER(ALL('Table'),[Year]=SELECTEDVALUE('Table'[Year])-1))
Var _Currentyear=SUM('Table'[Consumption])
Return
IF(_Previousyear=BLANK(),BLANK(),DIVIDE(_Currentyear-_Previousyear,_Currentyear))
Column =
Var _Previousyear=CALCULATE(SUM('Table'[Consumption]),FILTER('Table',[Year]=EARLIER('Table'[Year])-1))
Var _Currentyear=[Consumption]
Return
IF(_Previousyear=BLANK(),BLANK(),DIVIDE(_Currentyear-_Previousyear,_Currentyear))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |