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
debutant
Frequent Visitor

how to transform month and years as numbers to exploitable periods

Hello,

I have data with year and month in separate columns in number format, I would like to exploit those rather than the invoicing date field (for sales cutoff consideration).

debutant_1-1665864693951.png

How can this be achieved  ?

 

I have tried a solution I found suggested in this topice Solved: Converting from Month Name and Year to Date - Microsoft Power BI Community  which is to create these 2 additional columns:

MonthNum = SWITCH([Month],"January",1,"February",2,"March",3)

Date = EOMONTH(DATE([Year],[MonthNum],1),0)

But I have the following result

 

debutant_2-1665865072344.png

 

So I have changed my year and month columns from number to text format but that didn't make adifference.

 

Can you please help ?

 

thank you 

 

 

 

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi , @debutant 

According to your dax , i think there is no problem. 

This is my test dax:

Column = EOMONTH( DATE([Year],[Month],1) ,  0)

The result is as follows:

vyueyunzhmsft_0-1665972316740.png

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

Hi

 

I think the most simple is to create a date table with date, month year etc..; and link it to your fact table

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.

Top Solution Authors