Forum Discussion
Anonymous
8 years agoNot applicable
Need to create a function to Categorize values
Is there any way to create a column which will display only two values i.e "ClientSide", "OurSide" based on Colum A(ticketid) and ColumnB(interactionValue.) -For Example: if ticketId(ColumnA) 573319...
- 8 years ago
hi, Anonymous
Please try and test using it. And please mark the right reply as answer if your issue has been resolved, otherwise, please feel free to ask if you have any other issue.
Best Regards,
Rfranca
MarkS
8 years agoResolver IV
Hi Anonymous,
Here is a way using Query Editor, enter your table name in the Source step.
let
Source = Table,
#"Changed Type" = Table.TransformColumnTypes(Source,{{"TicketID", Int64.Type}, {"Interaction", type text}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"TicketID"}, {{"TempTable", each _, type table}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each List.ContainsAny([TempTable][Interaction],{"Resolution","Resolved"})),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Custom.1", each List.Contains([TempTable][Interaction],"Requested Info from Client")),
#"Added Conditional Column" = Table.AddColumn(#"Added Custom1", "Custom.2", each if ([Custom] and [Custom.1]) then "OurSide" else "ClientSide"),
#"Removed Columns" = Table.RemoveColumns(#"Added Conditional Column",{"Custom", "Custom.1"}),
#"Expanded TempTable" = Table.ExpandTableColumn(#"Removed Columns", "TempTable", {"TicketID", "Interaction"}, {"TicketID.1", "Interaction"})
in
#"Expanded TempTable"