Forum Discussion

rsderby68's avatar
rsderby68
Icon for Resolver I rankResolver I
4 years ago
Solved

How to transform a Power BI date column by range

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...
  • Stachu's avatar
    4 years ago

    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

  • Stachu's avatar
    Stachu
    4 years ago

    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