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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. 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
Solution Sage
Solution Sage

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
Solution Sage
Solution Sage

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.