Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi everyone,
I'm hoping you can help me.
I'm trying to create a new calculated column to split up a date to just show Month and Year. I can't seem to find a good calculated column code to do this.
Can anybody help me with this please?
Solved! Go to Solution.
Hi,
In case your existing column is text type (if it is not date type), please try something like below.
Please check the below picture and the attached pbix file.
result 01 CC =
VAR _day =
DAY ( Data_v2[Month] )
VAR _month =
MONTH ( Data_v2[Month] )
VAR _year =
YEAR ( Data_v2[Month] )
RETURN
FORMAT ( DATE ( _year, _month, _day ), "mmmm-yyyy" )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
Please check the below picture and the attached pbix file.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi Jihwan,
Thank you for your reply.
I tried your formula but it still seems to be showing the full month.
Any idea why this is the case?
Hi,
In case your existing column is text type (if it is not date type), please try something like below.
Please check the below picture and the attached pbix file.
result 01 CC =
VAR _day =
DAY ( Data_v2[Month] )
VAR _month =
MONTH ( Data_v2[Month] )
VAR _year =
YEAR ( Data_v2[Month] )
RETURN
FORMAT ( DATE ( _year, _month, _day ), "mmmm-yyyy" )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Apologies, I only got around to seeing this now.
That worked for me so thank you so much!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |