Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Experts,
I would like to identify sub header and update as column value, looking for solution given below in power query
Thanks in advance.
Solved! Go to Solution.
@babuInba
Add a conditional column, fill down and filter the price <> null. You can paste the below code on a new Blank Query and check the steps
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcisqzSwpVtJRUorViVZyLCjISQVyDA3AXP+ixLx0EN8Uwg9LTU8tSUzKSYVrCMnPTSzJB/KMoTryMvPzgFwjIDcWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Product = _t, Price = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Product", type text}, {"Price", Int64.Type}}),
#"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Category", each if [Price] = null then [Product] else null),
#"Filled Down" = Table.FillDown(#"Added Conditional Column",{"Category"}),
#"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([Price] <> null))
in
#"Filtered Rows"
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@babuInba
Add a conditional column, fill down and filter the price <> null. You can paste the below code on a new Blank Query and check the steps
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcisqzSwpVtJRUorViVZyLCjISQVyDA3AXP+ixLx0EN8Uwg9LTU8tSUzKSYVrCMnPTSzJB/KMoTryMvPzgFwjIDcWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Product = _t, Price = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Product", type text}, {"Price", Int64.Type}}),
#"Added Conditional Column" = Table.AddColumn(#"Changed Type", "Category", each if [Price] = null then [Product] else null),
#"Filled Down" = Table.FillDown(#"Added Conditional Column",{"Category"}),
#"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([Price] <> null))
in
#"Filtered Rows"
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group