Sub header in power query

Hi Experts,

Would like to know how to identify sub header in power query. i'm looking for solution below

Image

Answer
Answer

Hi,

This M code works

let

Source = Excel.CurrentWorkbook(){[Name="Data"]}[Content],

#"Added Custom" = Table.AddColumn(Source, "Category", each if [Price]=null then [Product] else null),

#"Filled Down" = Table.FillDown(#"Added Custom",{"Category"}),

#"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([Price] <> null)),

#"Changed Type" = Table.TransformColumnTypes(#"Filtered Rows",{{"Price", type number}})

in

#"Changed Type"

Hope this helps.

Image

Regards,

Ashish Mathur
www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 18, 2021 Views 62 Applies to: