Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do you create a straight table filtered by top 5 results of another straight table

Hi everybody,

I'm new to QlikView.  I've been searching around trying to find a solution to my question.

For simplicity, I have 4 straight tables.  Let's say table 1 has a dimension, Invoice Type, and a sum expression for the total.  Is there a way to have table 2-4 be updated based on the results of table 1?  The data for table 2-4 is dynamic and dependent on the results of table 1 since the results of table 1 can always change.  I've included a sample of table 1 and table 2, but table 3 and 4 will be similar except table 3 data will be based on the #2 invoice type from table 1, and table 4 data will be based on the #3 invoice type from table 1.  All of the table names will change based on the invoice type which changes based on their totals for the period being analyzed.

Any help with a solution will be greatly appreciated.  A sample .qvw would be even more greatly appreciated.

Table 1 - Invoice Type Summary

Invoice TypeTotal
Invoice Type 1$100K
Invoice Type 2$90K
Invoice Type 3$80K
Invoice Type 4$70K
Invoice Type 5$60K

Table 2 - Invoice Type 1 Detail (Dynamic Title)

  • Dimension filtered based on the #1 item invoice type from table 1
  • Shows the top 3 results, by customer, of the specific invoice type
Customer NameAmount
Customer Name 1$50K
Customer Name 2$10K
Customer Name 3

$5K

11 Replies
Not applicable
Author

I think that I can live with the sorting issue.  On a side note, if I were to add another expression, how would I go about making sure that the new expression pulls data from the data load for the corresponding record only?

sunny_talwar

Set analysis is the main thing here.... use the same set analysis in all your expression

Highest Invoice

{<[Invoice Type] = {"=Rank(Sum(Value), 4, 1) < 2"}>}

2nd Highest Invoice

{<[Invoice Type] = {"=Rank(Sum(Value), 4, 1) < 3 and Rank(Sum(Value), 4, 1) > 1"}>}

3rd Highest Invoice

{<[Invoice Type] = {"=Rank(Sum(Value), 4, 1) < 4 and Rank(Sum(Value), 4, 1) > 2"}>}