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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
hb0135
Helper III
Helper III

How to do addition of two columns one is date and other is number In Transform Dat of Power BI

Hello,
In Excel, i have added two columns in one column,the data  it is in date format, and the other is in number format I need to do the same in Transform Data. 

hb0135_0-1745983579645.png

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I suggest performing this in Power Query Editor.

I tried to create a sample pibx file like below.

Please check the below picture and the attached pbix file.

 

M codes that I used are, 

Number.From - PowerQuery M | Microsoft Learn

Date.From - PowerQuery M | Microsoft Learn

 

These help to convert date data type to number data type or convert number data type to date data type.

 

Jihwan_Kim_0-1745984910555.png

 

 

let
    Source = data_source,
    #"Added Custom" = Table.AddColumn(Source, "date", each Date.From ( Number.From([bookdate]) + [add] ), type date)
in
    #"Added Custom"

 

 


 

    Microsoft MVP
 

 

   


      If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


   


     
        LinkedInVisit my LinkedIn page
     

   


   


     
        Outlook BookingSchedule a short Teams meeting to discuss your question

     

   


 


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

I suggest performing this in Power Query Editor.

I tried to create a sample pibx file like below.

Please check the below picture and the attached pbix file.

 

M codes that I used are, 

Number.From - PowerQuery M | Microsoft Learn

Date.From - PowerQuery M | Microsoft Learn

 

These help to convert date data type to number data type or convert number data type to date data type.

 

Jihwan_Kim_0-1745984910555.png

 

 

let
    Source = data_source,
    #"Added Custom" = Table.AddColumn(Source, "date", each Date.From ( Number.From([bookdate]) + [add] ), type date)
in
    #"Added Custom"

 

 


 

    Microsoft MVP
 

 

   


      If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


   


     
        LinkedInVisit my LinkedIn page
     

   


   


     
        Outlook BookingSchedule a short Teams meeting to discuss your question

     

   


 


Hi Jihwan_Kim 

Thanks for the help it really work.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.