Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Would someone give me a hand here? Still learning Power BI transformations.
I have a column called created_at that has dates in format of ISO 8601 format YYYY-MM-DDTHH:MM:SSZ (Date/Time/TimeZone). I want to transform that column so that every value that is before 05/15/2022 is changed TO 05/15/2022 otherwise, leave the value the same. So the column should only have dates listed as 05/15/2022 or later.
Solved! Go to Solution.
assuming the previous step name is "#Changed Type"
= Table.TransformColumns(#"Changed Type",{{"created_at", each List.Max({_,#datetimezone(2022,5,15,0,0,0,0,0)}), type datetimezone}})
you can adjust time zone with the last 2 parameters of #datetimezone
In the Transform data mode, one you enable Query Settings in the View ribbon, you will be able to see the transformation steps in each table, the code I posted assumes that the previous step is called "#Changed Type" as in the picture below
Forgive my blankness but would you clarify what the "previous step name is "#Changed Type"" is for? Is "Changed Type" the original column name you mean?
Thanks for the formula I will try it!
assuming the previous step name is "#Changed Type"
= Table.TransformColumns(#"Changed Type",{{"created_at", each List.Max({_,#datetimezone(2022,5,15,0,0,0,0,0)}), type datetimezone}})
you can adjust time zone with the last 2 parameters of #datetimezone
Forgive my blankness but would you clarify what the "previous step name is "#Changed Type"" is for? Is "Changed Type" the original column name you mean?
Thanks for the formula I will try it!
In the Transform data mode, one you enable Query Settings in the View ribbon, you will be able to see the transformation steps in each table, the code I posted assumes that the previous step is called "#Changed Type" as in the picture below
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
21 | |
20 | |
15 | |
13 |
User | Count |
---|---|
45 | |
41 | |
39 | |
19 | |
19 |