Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
I copied M code and created a Dates Table. The problem is the table shows me the month name completely like January. I want to create a new colum in that dates table that will show me only Jan for January not the full name of the month. I`ve looked at some Youtube tutorials but none of them showed me how to create a new column in the dates table which has this abbreviation.
Thanks you in advance,
Solved! Go to Solution.
Hi @cristio
You can add a custom column
e.g
Output:
In power Query:
= Date.ToText([Date], "MMM")
Will return the text, ‘Jan’ from the date 1/1/2017.
= Date.ToText([Date], "MMMM")
Will return the text, ‘January’ from the date 1/1/2017.
= Date.ToText([Date])
Will simply return the date value as text in the same format it’s in.
You can refer to the following link:
Power Query Date Formats • My Online Training Hub
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cristio
You can add a custom column
e.g
Output:
In power Query:
= Date.ToText([Date], "MMM")
Will return the text, ‘Jan’ from the date 1/1/2017.
= Date.ToText([Date], "MMMM")
Will return the text, ‘January’ from the date 1/1/2017.
= Date.ToText([Date])
Will simply return the date value as text in the same format it’s in.
You can refer to the following link:
Power Query Date Formats • My Online Training Hub
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Cristio
My date table is also generated using "M". To add a column that returns JAN, FEB, MAR..., I use the following:
#"Inserted Short Month" = Table.AddColumn(
#"Inserted Month Name",
"Short Month Name",
each Text.Upper(Text.Start(Date.MonthName([Date]), 3)),
type text
),
I hope this helps.
@cristio , A new column in Power query
Date.ToText([Sales Date],"MMM")
Date Table in Power Query: https://youtu.be/so_A22HXbwM
Can you post the M code for date table?