Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Need help YOY % calculation , need to ignore one column

Hi Community..!!

PatilPrasad027_0-1726048729182.png

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?

8 REPLIES 8
Selva-Salimi
Super User
Super User

Hi @Anonymous 

 

You can write a measure as follows:

YOY% = (sum('Table'[Value]) - calculate(sum('Table'[Value]), filter(all('Table'),'Table'[Year]= SELECTEDVALUE('Table'[Year])-1)) )/ calculate(sum('Table'[Value]), filter(all('Table'),'Table'[Year]=SELECTEDVALUE('Table'[Year])-1))
 
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly. 
Anonymous
Not applicable

Hi, @Anonymous 

Based on your information, I create a sample table:

vyohuamsft_0-1726110292941.png

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:

vyohuamsft_1-1726110343545.png

 

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.

Anonymous
Not applicable

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.

Anonymous
Not applicable

Hi, @Anonymous 

Sorry for misunderstanding what you mean.

I create another sample table:

vyohuamsft_0-1726127378823.png

 

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:

vyohuamsft_1-1726127564187.png

 

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.

Anonymous
Not applicable

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.

Anonymous
Not applicable

Hi, @Anonymous 

Please provide more details with your desired output and pbix file without privacy information (or some sample data)

 

Best Regards

Yongkang Hua

 

Selva-Salimi
Super User
Super User

Hi @Anonymous 

 

would you please share your YOY calculation?!

Anonymous
Not applicable

Hi @Selva-Salimi 
Below is the code 

YOY% =
var total = SUM('LRP Data'[Value])
var pre_year = CALCULATE(SUM('LRP Data'[Value]),DATEADD('Calendar Table'[Date],-1,YEAR))
var result = DIVIDE((total - pre_year),pre_year,0)
RETURN result

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.