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

Application Filtering

Hi Everyone, I have a data model based on QVD files with a link table (not set up by myself). Everything works fine, however, there is now a requirement to filter the data being loaded into the application, so that it only pertains to a certain customer. What is the best way to filter at the application level? Is it just the standard way with table joins etc or is there another way in Qliksense?  Thanks.

Labels (3)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

@Or 

"Alternatively, you could apply a Left Join when loading those QVDs."

Did you mean a "Left Keep"?

-Rob

View solution in original post

6 Replies
Anil_Babu_Samineni

@NormanStanleyBadger I guess there are many ways.

1) ODAG (On demand App generation)

2) Section Access

3) Loop and reduce etc.

 

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Or
MVP
MVP

If you want to restrict the data being loaded, and it's coming from a QVD, the best way to filter is to only load the relevant data from the QVD using an Exists() condition to keep the load optimized, e.g.

Load * INLINE [

Customer

YourCustomerNameHere

];

 

Load Customer, Item, Quantity, Value

From YourFile.qvd

Where Exists(Customer);

NormanStanleyBadger
Author

Thanks for the responses guys, I will check out those ideas. 

I have a time restraint, so an in app solution would be best. The Where Exists sounds promising but I also have a couple of dimension tables that are not directly related to the customer. For example, consumer details, only the consumers that purchased this customer's product are relevant, but my current QVD contains all consumer details.

Or
MVP
MVP

You can switch those over to the same logic:

Load * From Transactions.qvd Where Exists(Customer);

Load * from Consumers.qvd Where Exists(Item); // Assuming Item is the key field and is listed in Transactions

etc.

Alternatively, you could apply a Left Join when loading those QVDs.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

@Or 

"Alternatively, you could apply a Left Join when loading those QVDs."

Did you mean a "Left Keep"?

-Rob

NormanStanleyBadger
Author

Thanks again, guys, Left Keep works a treat in testing, but it isn't working for me within the constraints of my data model where all the QVD tables are joined via a link table. The script for this is held outside my front end app, so I have requested a copy. Do you think this could be problem or am I missing something else?