Forum Discussion
Anonymous
6 years agoNot applicable
Count how many columns until value changes
Hi all! My colleagues and I want to use PBI for analysing some internal checks we're running on a monthly basis. For this we're using MS Forms which acts as the data input for PBI. The file we rec...
Anonymous
6 years agoNot applicable
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8ivNTUotUtJRKkmtKAFRRaWpuHhpiTnFcG5sLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, Department = _t, #"Question 1" = _t, #"Text 1" = _t, #"Question 2" = _t, #"Text 2" = _t, #"Question 3" = _t, #"Text 3" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", type text}, {"Department", type text}, {"Question 1", type logical}, {"Text 1", type text}, {"Question 2", type logical}, {"Text 2", type text}, {"Question 3", type logical}, {"Text 3", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "trueBeforefalse", each List.PositionOf(List.Alternate(List.Skip(Record.FieldValues(_)),1,1,0),false, Occurrence.First))
in
#"Added Custom"try this