Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How do i create another table which list out all possible combination (order does not matter) of supplier_name field in sets of 2 according to the event field?
sample data:
Category | event | supplier_name |
transport | event_1 | grab |
transport | event_1 | uber |
transport | event_1 | comfort |
transport | event_2 | grab |
transport | event_2 | uber |
transport | event_2 | tada |
transport | event_2 | ryde |
food | event_3 | kfc |
food | event_3 | macdonald |
food | event_3 | burger_king |
food | event_3 | five_fingers |
food | event_3 | long_john_silver |
desired_output:
Category | supplier_name | combination |
transport | event_1 | grab, uber |
transport | event_1 | grab, comfort |
transport | event_1 | uber, comfort |
transport | event_2 | grab, uber |
transport | event_2 | grab, tada |
transport | event_2 | grab, ryde |
transport | event_2 | uber, tada |
transport | event_2 | uber, ryde |
transport | event_2 | tada ryde |
food | event_3 | kfc, macdonald |
food | event_3 | kfc, burger_king |
food | event_3 | kfc, five_fingers |
food | event_3 | kfc, long_john_silver |
food | event_3 | macdonald, burger_king |
food | event_3 | macdonald, five_fingers |
food | event_3 | macdonald, long_john_silver |
food | event_3 | burger_king, five_fingers |
food | event_3 | burger_king, long_john_silver |
food | event_3 | five_fingers, long_john_silver |
is this an interview question?
yea
@stormseekerx1 You have created a duplicate thread, please close this with reference of this Solved: How do i create all possible combination (order do... - Qlik Community - 2414597