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

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

Reply
dineshj23
Helper I
Helper I

Converting month and Year in Separate Columns to One

Hi, 

I have the data in in this format. I have several columns for dates; Invoice1 date, Invoice2 date, for a total of 12 dates. Each month and date for these 12 dates is in different columns as in the chart below. I wanted to create a date for each of the dates to be simple like 1/1/2022. 

dineshj23_0-1677879447070.png

I tried doing this with =1*("1/"&'date'[Month]&"/"&'date'[Year]) but got the below errors. 

dineshj23_2-1677880507496.png

Then I tried "=format(Date" formula but got the below error. 

dineshj23_1-1677879645224.png

Is there a way to do this? 

 

Also, I have a seperate calendar built for the next two years. I want to place a chart view so I can see I have 3 invoices due in March 2023. This would be building a relationship with the calendar and the dataset above. How can I structure this so it works that I can see the 3 invoices thare due in March or 6 invoices in April. Sort of like a timeline. 

 

Thank you for your help. 

 

Thank you. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @dineshj23,

You can use the following calculated column formula to concatenate the year month and convert the result to date:

Transform Date =
DATEVALUE ( [Month] & "/1/" & [Year] )

1.PNG

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
dineshj23
Helper I
Helper I

Hi @Anonymous 

I used the formula you sent above and got this error. 

dineshj23_0-1678108717119.png

 

Anonymous
Not applicable

Hi @dineshj23,

My formula is creating a new column on your table to invoke the year and month fields and use DATEVALUE function of convert the concatenate values to date format.
Did these fields include blank values? If that is the case, you can add condition to check them at first and setting a default value as if statement false branch result.(in my formula, I used the current system date as default value)

Transform Date =
IF (
    Table[Month] <> BLANK ()
        && Table[Year] <> BLANK (),
    DATEVALUE ( Table[Month] & "/1/" & Table[Year] ),
    TODAY ()
)

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

HI @dineshj23,

You can use the following calculated column formula to concatenate the year month and convert the result to date:

Transform Date =
DATEVALUE ( [Month] & "/1/" & [Year] )

1.PNG

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors