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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Michalison
Helper II
Helper II

PowerBI Customn column

Michalison_0-1714050578267.png

I want to add a custom column that looks at the completed date i.e. 22/06/2019 looks at years to next course column i.e. 3 then puts a new date in the custom column of 3 years since the completed date (or however many years are in the years until next course column) is this possible?  Mant thanks

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Michalison 

you can try to create a column in PQ (pls make sure the date is in date type)

=Date.AddYears([Completed],[Years until next course])

11.PNG

 

or use DAX to create a column

Column = EDATE('Table'[Completed],'Table'[Years until next course]*12)
12.PNG
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

8 REPLIES 8
ryan_mayu
Super User
Super User

@Michalison 

you can try to create a column in PQ (pls make sure the date is in date type)

=Date.AddYears([Completed],[Years until next course])

11.PNG

 

or use DAX to create a column

Column = EDATE('Table'[Completed],'Table'[Years until next course]*12)
12.PNG
 
pls see the attachment below




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Yes thank you I tried both methods and they both worked  many thanks

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Uzi2019
Super User
Super User

hi @Michalison 
Try calculated column 

date new = DATE(YEAR(Sheet1[Date ])+Sheet1[Year Plus],MONTH(Sheet1[Date ]),DAY(Sheet1[Date ]))
 
Uzi2019_0-1714051546796.png

 

 

I hope I answered your question!

 

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

I have re-done it as  

Michalison_0-1714058618403.png

still getting an error

Hi @Michalison 
I got your problem

 

You complted column is not in Date data type. It is in text format.

Please convert your complted column into date column format so that my dax formula will work for you.

Uzi2019_2-1714106803995.png

 

Process> select your complted column > change data type > Date

Uzi2019_3-1714106953916.png

 

I hope I answered your question!

 

 

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

Hi @Michalison 

Take the calculated column.
right click on 3 dots > then select new column

Uzi2019_0-1714106467400.png

 

and write the formula which i have shared.

 

 

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

Thank you for your answer I have tried this but get an error

Michalison_0-1714053601171.png

It doesnt seem to like month/day etc

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.