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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
fbittencourt
Advocate II
Advocate II

Add date on my fact table

Simple question, my current Fact table needs a date column, I have already two columns that represents YEAR and MONTH both are text, I need to create a new column "Date" based on both columns, to connect to my new date table.

 

fbittencourt_0-1756711466144.png

 

 

Tks All

3 ACCEPTED SOLUTIONS
grazitti_sapna
Super User
Super User

Hi @fbittencourt,

 

Use Below  Function in Power Query to create date column 

 

#date( Number.FromText([Year]), Number.FromText([Month]), 1 )

 

or DAX

 

Date =
DATE ( VALUE ( FactTable[Year] ), VALUE ( FactTable[Month] ), 1 )

 

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!

View solution in original post

anmolmalviya05
Super User
Super User

Hi @fbittencourt, Hope you are doing well!

You can achieve this by using a calculated column with DAX:

Use below DAX to create the calculated column:
Date =
DATE (
VALUE ( 'Fact'[Year] ),
VALUE ( 'Fact'[Month] ),
1
)

 


If this post helps to answer your question, please consider accepting it as a solution so others can find it more quickly when they face a similar challenge.




Proud to be a Microsoft Fabric community super user




Let's Connect on LinkedIn




Subscribe to my YouTube channel for Microsoft Fabric and Power BI updates.

 

View solution in original post

v-menakakota
Community Support
Community Support

Hi  @fbittencourt  , 

Thanks for reaching out to the Microsoft fabric community forum. 

I would also take a moment to thank  @anmolmalviya05 , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference. 

Best Regards, 
Community Support Team  

 

View solution in original post

4 REPLIES 4
v-menakakota
Community Support
Community Support

Hi  @fbittencourt  , 

Thanks for reaching out to the Microsoft fabric community forum. 

I would also take a moment to thank  @anmolmalviya05 , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference. 

Best Regards, 
Community Support Team  

 

anmolmalviya05
Super User
Super User

Hi @fbittencourt, Hope you are doing well!

You can achieve this by using a calculated column with DAX:

Use below DAX to create the calculated column:
Date =
DATE (
VALUE ( 'Fact'[Year] ),
VALUE ( 'Fact'[Month] ),
1
)

 


If this post helps to answer your question, please consider accepting it as a solution so others can find it more quickly when they face a similar challenge.




Proud to be a Microsoft Fabric community super user




Let's Connect on LinkedIn




Subscribe to my YouTube channel for Microsoft Fabric and Power BI updates.

 

Shahid12523
Community Champion
Community Champion

your fact table has YEAR (ANNÉE) and MONTH (N_MOIS or MOIS) stored as text. To create a proper Date column in Power BI (so it can relate to your Date table), you can build a calculated column.

Here’s how:

 

Option 1 – Using DATE() function

If you have:

ANNÉE = "2023"

N_MOIS = "01"

You can create:

Date = DATE(
VALUE(FactTable[ANNÉE]),
VALUE(FactTable[N_MOIS]),
1
)


👉 This will give you the first day of the month (e.g., 2023-01-01).

 

Option 2 – If you already have a combined column like MOIS = 202301

Use:

Date = DATE(
INT(FactTable[MOIS] / 100),
MOD(FactTable[MOIS], 100),
1
)


👉 For 202301, this results in 2023-01-01.

Shahed Shaikh
grazitti_sapna
Super User
Super User

Hi @fbittencourt,

 

Use Below  Function in Power Query to create date column 

 

#date( Number.FromText([Year]), Number.FromText([Month]), 1 )

 

or DAX

 

Date =
DATE ( VALUE ( FactTable[Year] ), VALUE ( FactTable[Month] ), 1 )

 

🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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