March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello Everyone,
I want to know about how can I change one column with "2022-8-30" to three separate columns
Date = 30
Month = August
Year=2022
BR
Solved! Go to Solution.
Hi , @Anonymous
According to your description, you want to add three column by the [Date].
We can realize it both in Power Query Editor and in Power BI Desktop.
[1]Power Query Editor:
(1)We can click "Custom Column" in "Add Column":
(2)Then we can enter in turn:
Date.Year([Date])
Date.Month([Date])
Date.Day([Date])
(3)Then we can meet your need:
[2]Power BI Desktop:
(1)We can click "New Column":
(2)Then we enter in turn to create three calculated columns like this:
Year = YEAR('Table'[Date])
Month = MONTH('Table'[Date])
Day = DAY('Table'[Date])
(3)Then we can also meet your need:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @Anonymous
According to your description, you want to add three column by the [Date].
We can realize it both in Power Query Editor and in Power BI Desktop.
[1]Power Query Editor:
(1)We can click "Custom Column" in "Add Column":
(2)Then we can enter in turn:
Date.Year([Date])
Date.Month([Date])
Date.Day([Date])
(3)Then we can meet your need:
[2]Power BI Desktop:
(1)We can click "New Column":
(2)Then we enter in turn to create three calculated columns like this:
Year = YEAR('Table'[Date])
Month = MONTH('Table'[Date])
Day = DAY('Table'[Date])
(3)Then we can also meet your need:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
you can create derived column:
And use DAX:
for Day use Day function
For year use YEAR function
For Month: use the above format function
using the Month function gives output in numbers
To get full month name , you can use Switch statements or
Hi @Anonymous
there are several ways possible to achive this. I'd advice to do the following:
1. Selcect Datatype as Date (then you'll see a small Date-Icon)
2. Select the Column and then go to "Add Column", Here go to "From Date & Time" and there select the Options accordingly:
This will add the Columns as you want. When your'e finished, you can delete the original Column.
Best Regards!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
106 | |
98 | |
65 | |
54 |