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 Community..!!
1st image - We have data like this, for 2025 we have 2025 LBE and 2025 Plan
when i am trying to calculate previous year that time LBE and Plan is coming to 2026 (2nd image) which is not required.
How to calculate YOY % by ignoring Year-LP column?
Hi @Anonymous
You can write a measure as follows:
Hi, @Anonymous
Based on your information, I create a sample table:
Then create a calculated column, try the following dax:
YOY % =
VAR CurrentYear = 'Table'[Year]
VAR _PreviousYear = CurrentYear - 1
VAR CurrentValue = 'Table'[Revenue]
VAR PreviousValue =
CALCULATE(
SUM('Table'[Revenue]),
FILTER('Table', 'Table'[Year] = _PreviousYear)
)
RETURN
IF(
NOT(ISBLANK(PreviousValue)),
DIVIDE(CurrentValue - PreviousValue, PreviousValue, 0),
0
)
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Thanks for sharing.
But you have not added column - Year-LP in the table which is required, You can refer my question.
Thank You.
Hi, @Anonymous
Sorry for misunderstanding what you mean.
I create another sample table:
Then create a calculated column to filter year, here is the dax:
FilteredYear =
IF(
[Year-LP] = "LBE" || [Year-LP] = "Plan",
BLANK(),
[Year]
)
Create another calculated column, try the following DAX expression:
YOY% =
VAR _previousYear = CALCULATE(MAX('Table'[Year]),FILTER(ALLSELECTED('Table'),'Table'[Year-LP]=BLANK()&&'Table'[Year]<EARLIER('Table'[Year])))
VAR _previousvalue = CALCULATE(MAX('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Year-LP]=BLANK()&&'Table'[Year]=_previousYear))
RETURN
IF('Table'[Year-LP]=BLANK(),IF(_previousYear<>BLANK(),('Table'[Value]-_previousvalue)/_previousvalue,0))
Here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
The LBE and Plan is coming in the year 2026 that should not come after YOY% calculation , that is my ask.
Hope you have understood the requirement.
Hi, @Anonymous
Please provide more details with your desired output and pbix file without privacy information (or some sample data)
Best Regards
Yongkang Hua
Hi @Anonymous
would you please share your YOY calculation?!
Hi @Selva-Salimi
Below is the code
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |