Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi,
I am trying to create a measure formula that calculates the % change year over year that also takes into account changes from negative to positive numbers. I have the formula written out in excel below, but when I try to get the same formula written in PBI I get an error saying too few arguments passed. Any help would be greatly appreciated.
Excel Formula
=IF(LY %=0,0,(IF(LY %<0,(( LY % - TY %)/ LY %)*100,(( LY % - TY %)/ LY %)*-100)))
PBI Measure
Solved! Go to Solution.
You have an extra IF towards the end. Should be
% Change Calculated =
IF (
[LY Shortage Rate Calculated] = 0,
0,
IF (
[LY Shortage Rate Calculated] > 0,
( [LY Shortage Rate Calculated]
- [TY Shortage Rate Calculated] / [LY Shortage Rate Calculated] )
* -1,
( [LY Shortage Rate Calculated] ##You had an extra IF here
- [TY Shortage Rate Calculated] / [LY Shortage Rate Calculated] )
)
)
Thanks for the quick reply Dedelman_clng! I added in some divides into the formula with your change and it worked perfectly.
% Change Calculated =
IF (
[LY Shortage Rate Calculated] = 0,
0,
IF (
[LY Shortage Rate Calculated] > 0,
**DIVIDE** ( [LY Shortage Rate Calculated]
- [TY Shortage Rate Calculated] , [LY Shortage Rate Calculated] )
* -1,
**DIVIDE**( [LY Shortage Rate Calculated] - [TY Shortage Rate Calculated] , [LY Shortage Rate Calculated] )
)
)
You have an extra IF towards the end. Should be
% Change Calculated =
IF (
[LY Shortage Rate Calculated] = 0,
0,
IF (
[LY Shortage Rate Calculated] > 0,
( [LY Shortage Rate Calculated]
- [TY Shortage Rate Calculated] / [LY Shortage Rate Calculated] )
* -1,
( [LY Shortage Rate Calculated] ##You had an extra IF here
- [TY Shortage Rate Calculated] / [LY Shortage Rate Calculated] )
)
)
Thanks for the quick reply Dedelman_clng! I added in some divides into the formula with your change and it worked perfectly.
% Change Calculated =
IF (
[LY Shortage Rate Calculated] = 0,
0,
IF (
[LY Shortage Rate Calculated] > 0,
**DIVIDE** ( [LY Shortage Rate Calculated]
- [TY Shortage Rate Calculated] , [LY Shortage Rate Calculated] )
* -1,
**DIVIDE**( [LY Shortage Rate Calculated] - [TY Shortage Rate Calculated] , [LY Shortage Rate Calculated] )
)
)
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 20 | |
| 18 | |
| 14 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 41 | |
| 30 | |
| 24 |