Forum Discussion
Anonymous
4 years agoNot applicable
Guidance on IF statement selection PowerBi or PowerBi Switch
Good day all, I need some guidance. I have a Microsoft Form for HSE Company information with one list of names for all persons no matter which department they are from. All the responses from th...
jbwtp
Memorable Member
4 years agoHi Anonymous,
I think that you may need to do "Unpivot Columns". This will result in a code like this:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjLTt9A3MlLSUXLLzEvMS04FsiAoKDM5uxJIu+YW5ORXpqYqxeogK3etSE0uhqj0yofqQiiNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Date = _t, Department = _t, #"BA&L" = _t, Execs = _t, Finance = _t, Type = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Date", type date}, {"Department", type text}, {"BA&L", type text}, {"Execs", type text}, {"Finance", type text}, {"Type", type text}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Date", "Department", "Type"}, "Attribute", "Value")
in
#"Unpivoted Columns"Then you can filter out nulls. For 260 odd lines it should not be too slow.
Kind regards,
John