Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I have a column in my report which has date in it. I can extract Month Name from the column.
Is there any option where I can get the month and year together from this column? Like suppose I need a new column like Month'Year showing values like April'2021, May'2021 and so on in the column?
Or do I have to extract month name and year seperately and then combine them?
Regards,
Himanshu
Solved! Go to Solution.
Hi @Anonymous ,
You could use Date.ToText function to create a custom column.
https://docs.microsoft.com/en-us/powerquery-m/date-totext
Best Regards,
Jay
Hi @Anonymous ,
You can achieve this as below:
Click on your DATE column under FIELDS pane.
Under top ribbon, you will get the option to select required date format.
Thanks,
Pragati
@Pragati11 I actually want it in the power query only as I ned to create a custom column using that Month'Year Column.
What you've mentioned is completely right and I know it but i want it in the power query mode itself.
Hi @Anonymous ,
Add a custom column as follows in Power Query:
Date.ToText([YourDateColumn], "MMM-yyyy")
Thanks,
Pragati
I extracted individually and then merged. It solved my issue.
| User | Count |
|---|---|
| 56 | |
| 42 | |
| 30 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 71 | |
| 59 | |
| 39 | |
| 22 | |
| 22 |