Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Community,
I have a task where I'm having troubles coming up with the concept on how to write the script in Qlik Sense Data Model. I'm hoping for someone to shed some light on this. Basically I have a dataset of order details with fields such as Bill To, Ship To, Customer Part Num, Marketing Part Num, PO Num, Reported End Customer, Translated Customer, Parent ID, etc. and I have a rule file to annotate these orders into a specific customer name based on the rule parameters set up. The rule file is made up of fields that exists in the transactions and is set up in priority sequence. For example:
Example Rule File and few basic rules of the rule file:
Rule ID | Final Customer Name | Bill To | Customer Part Num | Marketing Part Num | PO Num | Reported End Customer | Translated Customer | Parent ID | Ship To |
1 | Amy | ABC | MM7879% | ||||||
2 | Brad | %DN7654% | BRA% | ||||||
3 | Dan | %DAN | |||||||
4 | Lily | LILY - GERMANY% |
Each transaction has to run the rule file in the priority order until a condition in the rule has been met to return the Final Customer Name and the Rule ID, then skip to the next transaction to continue the same action until all the Final Customer Name and the Rule ID has been determined. If there's any transaction that does not meet any of the rule conditions set up, then return others.
Anyone has any ideas how to set this up in Qlik Sense data model? Would love to hear some great ideas!
Thanks,
Elin