The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a file with 2 columns - Month & Year. The month column contains the month name only (Oct).
I would like to convert the month name to the month number but have not found any way to do this.
Any help would be greatly appreciated. Thank you.
Solved! Go to Solution.
Use an IF ELSE or SWITCH Statement. Example shown below
MonthNo = SWITCH('Year - Month'[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 )
'Year - Month'[Month] has the Month Names in it
Hi,
if you have a date format column like '01/01/2023' then maybe try
Use an IF ELSE or SWITCH Statement. Example shown below
MonthNo = SWITCH('Year - Month'[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 )
'Year - Month'[Month] has the Month Names in it
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
79 | |
72 | |
48 | |
39 |
User | Count |
---|---|
138 | |
108 | |
69 | |
64 | |
57 |