Forum Discussion
Change blank by earliest text value per week
- Anonymous3 years ago
Hi joshua1990 ,
Hope it helps.
let Source = Table.FromRows( Json.Document( Binary.Decompress( Binary.FromText("i45WMjIwMtY1MFTSUQJhBM9UKVYHWdYIiPNKc3KAlJlSbCwA", BinaryEncoding.Base64), Compression.Deflate ) ), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Archival Year-Week" = _t, Order = _t, #"Year-Week" = _t, Value = _t] ), #"Changed Type" = Table.TransformColumnTypes( Source, { {"Archival Year-Week", type date}, {"Order", Int64.Type}, {"Year-Week", type date}, {"Value", Int64.Type} } ), Custom1 = Table.TransformColumns( #"Changed Type", { "Year-Week", each if _ <> null then _ else Table.Group( #"Changed Type", {"Archival Year-Week"}, {{"Min", each List.Min([#"Archival Year-Week"])}} )[Min]{0} } ) in Custom1Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi joshua1990 ,
Hope it helps.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText("i45WMjIwMtY1MFTSUQJhBM9UKVYHWdYIiPNKc3KAlJlSbCwA", BinaryEncoding.Base64),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [#"Archival Year-Week" = _t, Order = _t, #"Year-Week" = _t, Value = _t]
),
#"Changed Type" = Table.TransformColumnTypes(
Source,
{
{"Archival Year-Week", type date},
{"Order", Int64.Type},
{"Year-Week", type date},
{"Value", Int64.Type}
}
),
Custom1 = Table.TransformColumns(
#"Changed Type",
{
"Year-Week",
each
if _ <> null then
_
else
Table.Group(
#"Changed Type",
{"Archival Year-Week"},
{{"Min", each List.Min([#"Archival Year-Week"])}}
)[Min]{0}
}
)
in
Custom1
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum