Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sanjujeeboy
Creator
Creator

how to combine two dimensions on front end

HI all,

i have a dimension "Traffic" in table 1 which has values 'EP', 'PP'

another dimension "Target.Traffic in table 2 which has values 'LP' , 'Retailer'

in front end i want to create a filter "Traffic"  which should have only 2 values EP and PP from both tables. (from table 2 wherever its LP it should be 'PP' and wherever Reatailer it should be EP)

how to acheieve this in front end ?

 

Labels (2)
1 Solution

Accepted Solutions
ArnadoSandoval
Specialist II
Specialist II

Hi @sanjujeeboy 

Please review my proposed solution to your problem; all these steps should be done at the Front-End UI.

  • Create a variable vTraffic, its default value equal to 'EP'
  • Add a Variable Input control (Custom Objects -> Qlik Dashboard Bundle -> Variable Input)
  • Configure your Variable Input to use the variable vTraffic (created at step 1);  Show as: Drop down; Fixed value, with two values: EP and PP. (look at the picture at the end)
  • Edit the Table1, modify the Traffic field, add the following expression; uncheck the Include null value.

=if(Traffic='$(vTraffic)', Traffic)

  • Edit the Table2, modify the Target.Traffic field, add the following expression; uncheck the Include null value.

=if('$(vTraffic)' = 'EP',

   if([Target.Traffic]= 'Retailer', [Target.Traffic]),

   if([Target.Traffic] = 'LP', [Target.Traffic]))

Exit edit mode and test the new selector.

Some screenshots:

03.Combine-two-values-01.jpg

03.Combine-two-values-02.jpg03.Combine-two-values-03.jpg

Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.

View solution in original post

1 Reply
ArnadoSandoval
Specialist II
Specialist II

Hi @sanjujeeboy 

Please review my proposed solution to your problem; all these steps should be done at the Front-End UI.

  • Create a variable vTraffic, its default value equal to 'EP'
  • Add a Variable Input control (Custom Objects -> Qlik Dashboard Bundle -> Variable Input)
  • Configure your Variable Input to use the variable vTraffic (created at step 1);  Show as: Drop down; Fixed value, with two values: EP and PP. (look at the picture at the end)
  • Edit the Table1, modify the Traffic field, add the following expression; uncheck the Include null value.

=if(Traffic='$(vTraffic)', Traffic)

  • Edit the Table2, modify the Target.Traffic field, add the following expression; uncheck the Include null value.

=if('$(vTraffic)' = 'EP',

   if([Target.Traffic]= 'Retailer', [Target.Traffic]),

   if([Target.Traffic] = 'LP', [Target.Traffic]))

Exit edit mode and test the new selector.

Some screenshots:

03.Combine-two-values-01.jpg

03.Combine-two-values-02.jpg03.Combine-two-values-03.jpg

Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.