Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear All,
Currently, month numbers are listed as M1, M2, ~~ , M10, M11 ~~, M100, M101, etc in an excel imported to Power BI.
I want to add a new column in Power BI assigning month numbers as M001, M002, ~~, M010, M011, ~~ , M100, M101, etc.
This is to align month number in X-axis in an ascending order.
I tried roughly in excel and following formula seemed to work:
=IF(LEN(A3)=2,LEFT(A3,1)&"00"&RIGHT(A3,1),IF(LEN(A3)=3,LEFT(A3,1)&"0"&RIGHT(A3,2)))
Can anyone help me to prepare a similar formula in Power BI to add a new month number column ?
Thanks in advance.
Solved! Go to Solution.
For your reference.
Thank you sir for a reply. I think it would have worked if there was only numerical value. But the month number column has an alphabet (M) as well.
Like, M1 --- > M001 etc.
Could there be any other option to prepare an updated column ?
Regards,
How about these formula?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |