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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Matho101
New Member

Time intelligence - Month and Year Issue

Hi,

 

New user so apologies for the ignorence. 

 

I am looking at using time intelligence to calculate Sales performance for Year on Year (total) & also Month vs Month. 

 

Problem is my sales data doesn't have a date column i.e sales have been grouped per month and per year.  When I try convert these to a time/date format is does not allow me to.  So data type remains as 'Text' for Month and 'Whole Number' for Year.  This means my time analysis DAX formulation doesn't work. 

 

Any suggestions?

 

Matho101_0-1645163076898.png

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Matho101 ;

You could create a column as follow:

Column = MONTH ( [MONTH] & " 1" )

The final output is shown below:

vyalanwumsft_0-1645507363774.png

Or create a column :

date = DATE([YEAR], MONTH ( [MONTH] & " 1" ),1)

The final output is shown below:

vyalanwumsft_1-1645507713068.png

 


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @Matho101 ;

You could create a column as follow:

Column = MONTH ( [MONTH] & " 1" )

The final output is shown below:

vyalanwumsft_0-1645507363774.png

Or create a column :

date = DATE([YEAR], MONTH ( [MONTH] & " 1" ),1)

The final output is shown below:

vyalanwumsft_1-1645507713068.png

 


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Samarth_18
Community Champion
Community Champion

Hi @Matho101 ,

 

Try this:-

Date = 
var _month = SWITCH([month],"Jan",1,
"Feb",2,
"Mar",3,
"Apr",4,
"May",5,
"Jun",6,
"Jul",7,
"Aug",8,
"Sep",9,
"Oct",10,
"Nov",11,
"Dec",12)
return DATE([Year],_month,1)

 

Output:-

Samarth_18_0-1645168422331.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

amitchandak
Super User
Super User

@Matho101 , Create a new date column using the DAX

Date = datevalue("01-"&[Month] & "-"&[Year] )

 

Join this with a date table(join with date not month) and use time intelligence

 

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

 

Thanks, however when I add the dax you suggested I get this?

 

Matho101_0-1645167298259.png

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.