Forum Discussion
Rosalind90
2 years agoFrequent Visitor
How to represent a step-by-step process with rank or index
Hi, I have a step-by-step process I need to represent in a table, in multiple ways. I essentially need a way to assign numerical values to text, but that isn't possible. I'm not sure if rank or inde...
- 2 years ago
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ldK9DoMgEAfwV7kwuwj2AdqlU5PuxkHLaUwIJKfU+PYlQhuxVuvAx/Dj8ucgz9kNy84SwsPUNSJUWOqOJSx1g1D6GVJWJDm7UqvlEvII8gmepYSGjNWyg95A3aoeyQkRWTHZi2kVDKUHWQSyCdyNJQ/APN0UCjtzcqNSFsMSUn4VnBN+sKTYvvic+rQb7WwIUb/XEHarU7Hf72zsxbE4//R6RKXM8NnsXIGvnODrL7RkP37GkrnMxQs=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Step Names" = _t, #"Step Order" = Int64.Type, Groups = _t, #"ROBOT NAME" = _t]), #"Added Custom" = Table.AddColumn(Source, "Group Status", (k)=> let lm=List.Min(Table.SelectRows(Source, each [Groups]=k[Groups])[Step Order]) in Table.SelectRows(Source, each [Groups]=k[Groups] and [Step Order]=lm)[Step Names]{0},type text) in #"Added Custom"How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.
lbendlin
Super User
2 years ago
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("ldK9DoMgEAfwV7kwuwj2AdqlU5PuxkHLaUwIJKfU+PYlQhuxVuvAx/Dj8ucgz9kNy84SwsPUNSJUWOqOJSx1g1D6GVJWJDm7UqvlEvII8gmepYSGjNWyg95A3aoeyQkRWTHZi2kVDKUHWQSyCdyNJQ/APN0UCjtzcqNSFsMSUn4VnBN+sKTYvvic+rQb7WwIUb/XEHarU7Hf72zsxbE4//R6RKXM8NnsXIGvnODrL7RkP37GkrnMxQs=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Step Names" = _t, #"Step Order" = Int64.Type, Groups = _t, #"ROBOT NAME" = _t]),
#"Added Custom" = Table.AddColumn(Source, "Group Status", (k)=> let lm=List.Min(Table.SelectRows(Source, each [Groups]=k[Groups])[Step Order])
in Table.SelectRows(Source, each [Groups]=k[Groups] and [Step Order]=lm)[Step Names]{0},type text)
in
#"Added Custom"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the Source step with your own source.
Rosalind90
2 years agoFrequent Visitor
This did the trick! Thank you!