Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello
I want to make the day/number format of a column to be:
Sat 19/03/22 14:30
How can I do that in both Power Query and DAX?
Thanks
Solved! Go to Solution.
In Power Query:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrTUNzDWNzIwMlIwNLEyNlCK1YlWMrJACJpaGUAEjQ30DUyggmYwlQaG+gZmUEEjsMpYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Date Time" = _t]),
#"Changed Type1" = Table.TransformColumnTypes(Source,{{"Date Time", type datetime}}),
#"Inserted Day Name" = Table.AddColumn(#"Changed Type1", "Day Name", each Date.DayOfWeekName([Date Time]), type text),
#"Inserted Merged Column" = Table.AddColumn(#"Inserted Day Name", "Date Text", each Text.Combine({[Day Name], " ", Text.From([Date Time], "es-ES")}), type text),
#"Removed Columns" = Table.RemoveColumns(#"Inserted Merged Column",{"Day Name"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Date Text", "Date Text PQ"}})
in
#"Renamed Columns"
With DAX:
Date Text DAX =
VAR DayName =
SWITCH (
WEEKDAY ( Dates[Date Time], 2 ),
1, "Monday",
2, "Tuesday",
3, "Wednesday",
4, "Thursday",
5, "Friday",
6, "Saturday",
"Sunday"
)
RETURN
DayName & " " & Dates[Date Time]
Proud to be a Super User!
Paul on Linkedin.
Hi @Anonymous ,
Whether the advice given by @PaulDBrown has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.
Best Regards,
Henry
@v-henryk-mstf @PaulDBrown I have data like:
19/03/22 14:30
I want to make it Sat 19/03/22 14:30 in a way that we do in Excel, i.e. TEXT(A1,"DDD dd/MM/yy hh:mm")
Is this possible?
In Power Query:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMrTUNzDWNzIwMlIwNLEyNlCK1YlWMrJACJpaGUAEjQ30DUyggmYwlQaG+gZmUEEjsMpYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Date Time" = _t]),
#"Changed Type1" = Table.TransformColumnTypes(Source,{{"Date Time", type datetime}}),
#"Inserted Day Name" = Table.AddColumn(#"Changed Type1", "Day Name", each Date.DayOfWeekName([Date Time]), type text),
#"Inserted Merged Column" = Table.AddColumn(#"Inserted Day Name", "Date Text", each Text.Combine({[Day Name], " ", Text.From([Date Time], "es-ES")}), type text),
#"Removed Columns" = Table.RemoveColumns(#"Inserted Merged Column",{"Day Name"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Date Text", "Date Text PQ"}})
in
#"Renamed Columns"
With DAX:
Date Text DAX =
VAR DayName =
SWITCH (
WEEKDAY ( Dates[Date Time], 2 ),
1, "Monday",
2, "Tuesday",
3, "Wednesday",
4, "Thursday",
5, "Friday",
6, "Saturday",
"Sunday"
)
RETURN
DayName & " " & Dates[Date Time]
Proud to be a Super User!
Paul on Linkedin.
Hi @Anonymous ,
It doesn't seem very clear what you need, what form of raw data type do you have? Can you provide relevant screenshot information and the desired result.
How to Get Your Question Answered Quickly - Microsoft Power BI Community
Best Regards,
Henry
What do the values look like?
Proud to be a Super User!
Paul on Linkedin.
The total target hours of full months worked is 100
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.