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

Filter from one table and use results in join with another table

Hi,

I've looked for a solution to my problem below and couldn't find an answer in the discussions:

I have 2 tables:

Table A: User By Campaign By Campaign Date:

UserCampaignCampaign Date
a@mail.comA01/01/2019
b@mail.comA01/01/2019
c@mail.comB01/03/2019
d@mail.comB01/03/2019

 

Table B: Spend By User By Date:

DateUserSpend
01/01/2019a@mail.com200
01/01/2019d@mail.com100
01/02/2019c@mail.com300
01/02/2019b@mail.com400

 

My objective is to have the Campaign from the user input in the dashboard (using a filter for example) and show the sum of spend for the impacted users for that given campaign by day. My idea was to do the following:

  1. User selects a campaign from a filter in the dashboard
  2. Input from the user is used to filter all users impacted by that campaign from Table A
  3. Get the list of users and the campaign date resulted from the filter and join in Table B
  4. Filter only the joined users from Table A in Table B
  5. Show the results in a bar chart by day starting in the campaign date

Is it possible to do that in a dashboard? If so how should I proceed?

Any help is very welcome!

Thanks!

2 Replies
Vegar
MVP
MVP

If your data tables looks just like you described in your data model then the following expression could do the trick.

SUM({<Date=P([Campaign Date])>}Spend)
tmatuki
Contributor
Contributor
Author

Hi Vegar, thanks for the quick response.

I'm a beginner on the Qlik syntax so excuse me for the basic questioning. Your suggestion is to included that expression as a measure?

Just to clarify: I need to retrieve the list of users impacted for a given campaign from Table A, before using them to check their spend in Table B, so just filtering by Campaign Date won't work.

Thanks in advance.