Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
EFC
Contributor
Contributor

Combining Fields in a Table Chart from Two Different Data Sets with different levels of granularity

Hi -

I have attempted building a Set Analysis to accomplish the scenario below, but cannot seem to figure it out.  This is sample data I made up for this question, but represents what the end user is asking.

I have two data sets in my App.  The first is a summary table with the total number of possible users for a program:

Table2.Program_NameTable2.Total_Possible_Users
A40
B30
C25

 

The second table is the number of people that have used the program each day:

Table1.Program_NameTable1.DateTable1.Number_of_Logins
A8/1/202120
B8/1/202130
C8/1/202115
A8/2/202110
B8/2/20215
C8/2/202120
A8/3/20215
B8/3/202110
C8/3/202120
A8/4/202110
B8/4/202110
C8/4/202110

 

I am attempting to build a summary table that shows the total number of logins by Program Name based on the date range selected by the end user, and regardless of this date range, show the number of possible users in another column.

So if I select all dates it would look like this:

Program_NameNumber_of_LoginsTotal_Possible_Users
A4540
B5530
C6525

 

If I select only 8/1 and 8/2 it would look like this:

Program_NameNumber_of_LoginsTotal_Possible_Users
A3040
B3530
C3525

 

So regardless of the date range, Total_Possible_Users is always the same.

I know if I do a straight join I get a many to one set, and the numbers in Total_Possible_User column is overstated.

I attempted to create a Set Analysis where Table1.Program_Name = Table2.Program_Name and get a Distinct Total_Possible_Users number.  In all my attempts I either get 0 for each row or 95.

Any help or guidance is greatly appreciated.

1 Solution

Accepted Solutions
rubenmarin

Hi, maybe I didn't understood it... why you can't kepp them as separated tables in data model? Table 1 would be the fact table and table 2 an auxiliary table related by Program_Name.

Then in front-end you only need a table with Program_Name as Dimension and Sum(Number_of_Logins) and Sum(Total_Possible_Users) as expressions.

View solution in original post

1 Reply
rubenmarin

Hi, maybe I didn't understood it... why you can't kepp them as separated tables in data model? Table 1 would be the fact table and table 2 an auxiliary table related by Program_Name.

Then in front-end you only need a table with Program_Name as Dimension and Sum(Number_of_Logins) and Sum(Total_Possible_Users) as expressions.