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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
joelaubry
Regular Visitor

How to get a value year+1 in a custom column

Hello all, 

 

As first message in here, I hope I'm in the good section. 

 

In my data source file, I have some projects that can be repeted trough the years. In another column, I will have the benefits for the year mentioned. However, I would like to create a custom column showing the benefit but year +1, which is appearing in my datasource but in another rows. 

 

To illustrate : 

 

Project     year      benefit  

   001      2020     150 000

001         2021     175 0000 

 

I wish I could create a column showing to the right of the 150 000 the result of 175 000 as it is referenced under the same project number and other same references. 

 

Any idea ? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @joelaubry ,

Please try to create a new column with below dax formula:

Column =
VAR cur_year = [Year]
VAR cur_project = [Project]
VAR _a =
    CALCULATE (
        MAX ( 'Table'[Benefit] ),
        FILTER ( 'Table', [Project] = cur_project && [Year] = cur_year + 1 )
    )
RETURN
    _a

vbinbinyumsft_0-1698133418532.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
Anonymous
Not applicable

Hi @joelaubry ,

Please try to create a new column with below dax formula:

Column =
VAR cur_year = [Year]
VAR cur_project = [Project]
VAR _a =
    CALCULATE (
        MAX ( 'Table'[Benefit] ),
        FILTER ( 'Table', [Project] = cur_project && [Year] = cur_year + 1 )
    )
RETURN
    _a

vbinbinyumsft_0-1698133418532.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Many thanks ! I had to introduce many variables because of the filters but it works perfectly I think ! 

Uzi2019
Super User
Super User

Hi @joelaubry 
You can add calculated column like below
Next year= Year('Date')+1

 

Uzi2019_0-1697782529471.png

 

 

If this is not what you want then give expected output in excel screenshot


If my post helps you give kudos and accept it as a solution!
Thanks

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hello, 

 

No, it's not what I meant, sorry if I explained badly. 

 

It's not the year +1 I want to see in the added column, it is the result of year + 1. 

 

Project     year      benefit    Benefit Year+1

   001      2020     150 000     175 000

001         2021     175 0000 

 

 

This is shown in my exemple just above. The idea is to return the result of 2021 but on the row of 2020. 

Hi @joelaubry 
Please try the below measure:

Next benefits =
Var B= YEAR(DATE(Max(Next[Year]),1,1))+1
Var a=CALCULATE(SUM(Next[Benefits]),Next[Year]=B)
Return a
 

Uzi2019_0-1697791386854.png

 

I hope I answered your question Please give kudos and accept it as a solution!
Thanks

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

I think it should work if I put all filters ! Thanks ! But I prefered the other solution. Many thanks for your help !!!!

Hi, 

 

sorry for late answer. I'm not sure to understand where is your "Next" function coming from. 

Hi @joelaubry 

Next benefits =
Var BYEAR(DATE(Max(Table[Year]),1,1))+1
Var a=CALCULATE(SUM(Table[Benefits]),Table[Year]=B)
Return a
 
Next is my table name.

I hope I answered yor question please give kudoa and accept it as a solution!

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hi @joelaubry 
If there is no date column like proper date then do the following
Y2= YEAR(DATE([Y],1,1))+1

Uzi2019_1-1697782667775.png

 

If my post helps please give kudos and accept it as a solution!
Thanks

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.