0
votes

I have colunm where date format DD/MM/YYYY I want to extract only month name like this MMM using power query and a calculated column

Example:

15/01/2021 becomes Jan

3

3 Answers

1
votes

You can add a new column like below :

 Month = Format([YourDate],”MMM”)

Or using a custom column :

= Table.AddColumn(#"Changed Type", "NewColumn", each DateTime.ToText([YourDate], "MMM"), type text)
0
votes

Looks like you are quite new to PowerQuery, you can use the editor, or add the following to your M Script.

= Table.AddColumn(#"Renamed Columns2", "Custom", each Date.ToText([Date], "MMM"))

Add a custom column

enter image description here

0
votes

open Power Query Editor -> click on Column from Examples -> Choose From Selection option

Select the date column from which you want to extract and then rename the new column as month.

Now, for example, if your first date in the date column is "15/01/2021" then type as jan and type the same in the second column as well as "jan" if the date is from the month of january then click on the screen. so all the values will become as "jan".

then you have to find a row which contains another month like "february" in your date column, then type "feb" and then click somewhere on the screen

you should get the result you wanted. :)

p.s. If this (or another) answer helps you, please take a moment to "accept" the answer that helped by clicking on the check mark beside the answer to toggle it from "greyed out" to "filled in".