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 I show nothing in a Straight Table if filters don't match anything

Hi there.

I have a Straight Table and list box filters that filter dimensions for it.  Is there a way to change the default behavior of Qlikview to apply filters even if there is no matching records to return?  I want the table to be empty.  Currently when I apply a filter that results in no records, Qlikview pulls another filter from the selection to keep showing records.

Thank you.

1 Solution

Accepted Solutions
Not applicable
Author

This can be achieved by using set analysis in an expression the straight table.

To recap I wanted to be able to make selections in filter listboxes that would update the results in a straight table.  Next I had a button that I wanted to click that would further filter the currently shown results in the straight table based on a dimension not used by the other listboxes.  If that button resulted in no results returned, I wanted the straight table to show nothing.

My original implementation had a hidden listbox field that the button would make a selection on.  When the button made a selection in this new dimension and no results were available, Qlikview would remove another filter set on one of the other listboxes to continue showing results.

My new implementation to resolve this was create an expression in the straight table that did set analysis on the dimension I was trying to filter eg: Sum({<MyDimension={MyValue}>} MyDimension). 

View solution in original post

8 Replies
sunny_talwar

Have never seen that, can you share a sample of what you are seeing?

swuehl
MVP
MVP

Could you upload a small sample QVW that demonstrates this?

Anonymous
Not applicable
Author

Very strange, not sure what you are talking about, any sample?

swuehl
MVP
MVP

Are you using some kind of dimension group?

Not applicable
Author

Thank you for the help.

Here is a link to download a sample QVW:

https://onedrive.live.com/redir?resid=9FFC5C8E42E20CA3!916&authkey=!AKTjc1ZD_5q5i3I&ithint=file%2cqv...

If you select A1 in Dim1 listbox the Straight Table's rows are reduced to one row having A1.  I want this.

If you select B2 in Dim2 listbox, A1 is removed from current selections, B2 is selected and the Straight Table's rows are reduced to one row having B2.

My post is focused on the Test Button and Dim4.  Dim4 will be hidden.  Test Button will select D2 from Dim4.  This is hardcoded behavior.  I want specific behavior here where if what is currently selected in Dim1,Dim2,Dim3 doesn't have D2, when Test Button is clicked for the Straight Table to show nothing at all.  If What is currently selected by Dim1,Dim2,Dim3, I want Dim4 to additionally filter it as usual.

sunny_talwar

Can you check if this is doing what you want?

Not applicable
Author

Hi Sunny.  This is awesome so far!

Is there a way to maintain what is currently selected after "Test Button" is clicked?

Here's a complete Use Case to understand better:

Click A1 in Dim1

Straight Table shows: A1,B1,C1,D1

Click Test Button

A1 is still showing as selected in Dim1(highlighted green)

Straight Table shows: nothing

User sees A1 selected(green) and understands there are no records for it after filtering with Test Button

Click Test Button 2 (this is a button i'm adding soon to undo Test Button's actions)

Straight Table shows what was previously showing: A1,B1,C1,D1

Not applicable
Author

This can be achieved by using set analysis in an expression the straight table.

To recap I wanted to be able to make selections in filter listboxes that would update the results in a straight table.  Next I had a button that I wanted to click that would further filter the currently shown results in the straight table based on a dimension not used by the other listboxes.  If that button resulted in no results returned, I wanted the straight table to show nothing.

My original implementation had a hidden listbox field that the button would make a selection on.  When the button made a selection in this new dimension and no results were available, Qlikview would remove another filter set on one of the other listboxes to continue showing results.

My new implementation to resolve this was create an expression in the straight table that did set analysis on the dimension I was trying to filter eg: Sum({<MyDimension={MyValue}>} MyDimension).