This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello everyone, my data set has these columns:
But when I am creating a measure:
Any hints and help to help me get the correct Latest date in the data set (1/1/2022) will be greatly appreciated. TIA! ❤️
Solved! Go to Solution.
Hi @Mario_Nistal ,
You can not use DateTime format and Date format at the same time in a column in Power BI Desktop, it would be changed to text type.
You need to change the type to both datetime or both date type, then create the previous measure to get the MaxDate.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("TZBLjsMwDEOvUmQ9gER9aoe7HmCA2Qe5/zXq1COnKwN6FknxODaI7WJqeDhdOd6/3+38OTaTXnNzZjxeNQcmgFGD0NpwgU0SjKTbF4gJnlRj9NJyMV9asRPxRdokOaa0XlohqBVQk7nEUqxMsjGt5k3+laBX3tAbWK+8aYTfwHXFsmGzFxn/o1Z0Z+AGjnIPJ7LAKPc5QaePQ5Y7dNU1gl0VL5er4Jyo0ZPR6vqxgb5I0FcvkI+/bef5Bg==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Soak Start Date" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Soak Start Date", type text}}),
#"Changed Type with Locale" = Table.TransformColumnTypes(#"Changed Type", {{"Soak Start Date", type datetime}}, "en-US")
in
#"Changed Type with Locale"
If you do not want to show time, you can change the format to short date:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Mario_Nistal ,
You can not use DateTime format and Date format at the same time in a column in Power BI Desktop, it would be changed to text type.
You need to change the type to both datetime or both date type, then create the previous measure to get the MaxDate.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("TZBLjsMwDEOvUmQ9gER9aoe7HmCA2Qe5/zXq1COnKwN6FknxODaI7WJqeDhdOd6/3+38OTaTXnNzZjxeNQcmgFGD0NpwgU0SjKTbF4gJnlRj9NJyMV9asRPxRdokOaa0XlohqBVQk7nEUqxMsjGt5k3+laBX3tAbWK+8aYTfwHXFsmGzFxn/o1Z0Z+AGjnIPJ7LAKPc5QaePQ5Y7dNU1gl0VL5er4Jyo0ZPR6vqxgb5I0FcvkI+/bef5Bg==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Soak Start Date" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Soak Start Date", type text}}),
#"Changed Type with Locale" = Table.TransformColumnTypes(#"Changed Type", {{"Soak Start Date", type datetime}}, "en-US")
in
#"Changed Type with Locale"
If you do not want to show time, you can change the format to short date:
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
please make sure all these column are dates.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.