Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Justas4478
Post Prodigy
Post Prodigy

Changing date format to have short month name

Hi, I have this start of week column in my calendar

Justas4478_0-1729584584014.png

I want to create another column that would show start of week from this format in the image to this "14 Oct" I know there is option to change date formating in column

Justas4478_1-1729584777696.png

But the problem with this is that it gives month name in full where I want only short versions that only show first 3 caracter of the month like this 

Justas4478_2-1729584906512.png

I tried to use this mcode solution to solve my problem but it did not work.
Date.ToText(#date([#"Start of Week"]),[Format="dd-mmm", Culture="en-UK"])
And it gave me this error instead

Justas4478_3-1729585104147.png

I am not really good with mcode so I am not sure on how to do it.

1 ACCEPTED SOLUTION
BeaBF
Super User
Super User

@Justas4478 Hi! Try with:

= Table.TransformColumns(#PREVIOUS STEP, {{"Start of Week", each Date.ToText(_, "dd MMM"), type text}})

 

BeaBF_0-1729585553156.png

 

 

If it's ok, please accept my answer as solution!

 

BBF

View solution in original post

6 REPLIES 6
Omid_Motamedise
Super User
Super User

Add a new column by rewriteing the formula as follow

 

Date.ToText([#"Start of Week"]),[Format="dd-mmm", Culture="en-UK"])


If my answer helped solve your issue, please consider marking it as the accepted solution.
BeaBF
Super User
Super User

@Justas4478 Hi! Try with:

= Table.TransformColumns(#PREVIOUS STEP, {{"Start of Week", each Date.ToText(_, "dd MMM"), type text}})

 

BeaBF_0-1729585553156.png

 

 

If it's ok, please accept my answer as solution!

 

BBF

@BeaBF It worked.
But when I tried to do sorty by column by Start of week.

Justas4478_0-1729586274031.png

I got this error message

Justas4478_1-1729586312047.png

I think it has something to do with no year being in new column that I created.
I think some sorting column needs to be created.

@Justas4478 you can just order the column in the power query, so it will mantain that order, code:

= Table.Sort(Custom1, {{"Start of Week", Order.Ascending}})

 

BeaBF_0-1729586846242.png

 

or you can create an index in DAX like:

UniqueIndex =
RANKX(
    VALUES('Table'[Formatted Start of Week]),
    'Table'[Formatted Start of Week],
    ,
    ASC,
    Dense
)
and use this column to sort the new one.
 
BBF

@BeaBF I created another column that has year in it and it allows sorting without any problems.

Justas4478_0-1729588437829.png

 

@Justas4478 Of course, it happened because there were multiple years for the same date. But I thought you wanted it intentionally without the year. So it works. Accept my first response as the solution

 

BBF

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.