Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
xyz_1011
Partner - Creator
Partner - Creator

QlikView Data Modelling Challenge

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

  • have article ids corresponding to toys and
  • customer_nationality_id corresponding to Italy.

another example (also in the attached QVW):
Group: "german_customers" (exclusion): Selecting this group should result the fact table being reduced to data where

  • the customer_nationality_id is not 1 or 2

 

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 )

Labels (2)
1 Reply
marcus_sommer

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.