The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi everyone,
I'm looking to create new calculated columns to seperate the already existing Date column I have.
I want to have one column with just the day, another column with just the month and another column with just the year.
Any idea on how to do this?
Any help would be greatly appreciated.
Solved! Go to Solution.
Hi @gbarr12345
You asked for Calculated Columns so in DAX you would use
Day = DAY('DataTable'[Promotion_Week_Ending])
Month = MONTH('DataTable'[Promotion_Week_Ending])
Year = YEAR('DataTable'[Promotion_Week_Ending])
But if you want Custom Columns in Power Query use these
= Date.Day([Promotion_Week_Ending])
= Date.Month([Promotion_Week_Ending])
= Date.Year([Promotion_Week_Ending])
Regards
Phil
Proud to be a Super User!
Hi @gbarr12345
You asked for Calculated Columns so in DAX you would use
Day = DAY('DataTable'[Promotion_Week_Ending])
Month = MONTH('DataTable'[Promotion_Week_Ending])
Year = YEAR('DataTable'[Promotion_Week_Ending])
But if you want Custom Columns in Power Query use these
= Date.Day([Promotion_Week_Ending])
= Date.Month([Promotion_Week_Ending])
= Date.Year([Promotion_Week_Ending])
Regards
Phil
Proud to be a Super User!
Thank you very much for that. Much appreciated!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
80 | |
80 | |
48 | |
40 |
User | Count |
---|---|
150 | |
110 | |
64 | |
64 | |
58 |