Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey all,
i am struggling with the following challange: I have a set of groups where each group defines a scope of facts. The scope is determined by a set of articles and customer_nationalities using inclusion or exclusion.
Example (please see attached QVW for actual use case):
Group: "toys_italian_customers_only" (inclusion): Selecting this group should result in the fact table being reduced to only data that
another example (also in the attached QVW):
Group: "german_customers" (exclusion): Selecting this group should result the fact table being reduced to data where
Looking forward to get some hints, help or advise
Thank a lot in advance!
(for the ones only having Sense these days, please find the script in the attached .txt )
I think I would create a listing of the customer-article-combinations probably by joining the 3 group-tables and loading them as mapping-table like:
m: mapping load customer & '|' & article, 1 from JoinTable;
and within the fact-table something like:
...
applymap('m', customer & '|' & article, 0) as Flag
...
Instead of a single Flag field you may also create several ones and/or using multiple mapping-tables and (nested) applymap() logic to get your include/exclude logic and you may also reverse the 0/1 assigning logic to simplify the join & mapping approaches.
If the include/exclude could contain some overlapping you need in each case some advanced logic by using several Flags or applying The As-Of Table - Qlik Community - 1466130.