Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
smolly1621
Contributor II
Contributor II

Filter Specific Visual WITHOUT Alternate States

My goal is to have multiple of the same filter on a page so that users can compare different values of the measure. Ex: User compares multiple locations for housing and see's pros and cons. These filters should only impact specific visuals on the page.

The key here is to NOT use Alternate States as I need to make the visuals a master item and that is a limited capability with alternate states.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Here's how we used to do it before Alternate States.

Reload copies of your "alternate" dimensions into island tables, for as many alternative "groupings" as you want. In this example, two.

ProductIsland1:
LOAD
ProductName as ProductName1
Resident Products;

ProductIsland2:
LOAD
ProductName as ProductName2
Resident Products; 

Make listboxes or other selection mechanisms for the island fields.

In your Measure, use the set P() function to reference the island field.

Sum({<ProductName=P(ProductName1)>}LineSalesAmount) 

Sum({<ProductName=P(ProductName2)>}LineSalesAmount) 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

P.S. If you see me in the bar you can ask me how we used to do this before Set Analysis.

View solution in original post

7 Replies
Dalton_Ruer
Support
Support

Step 1: Create multiple versions of the tables as Data Islands. 

Data:
Load * Inline [
ProdID, Deadline, Qty
A, 1/09/2021, 2
A, 1/12/2021, 2
A, 3/21/2021, 1
A, 4/12/2021, 4
B, 1/06/2021, 1
B, 1/17/2021, 3
B, 2/16/2021, 2
];

Data2:
Load ProdID as ProdID2,
Deadline as Deadline2,
Qty as Qty2
Resident Data;

Step 2: Use ValueList to be the dimension for your BarCharts or whatever, and create as many variations as you wish:

=ValueList('Table1', 'Table2')

Step 3: Check your Values and do the appropriate expression. In this example I sum the Qty from table1 for the first value, and sum the Qty2 field, which is in the second table for the second bar. 

If (ValueList('Table1', 'Table2') = 'Table1', Sum(Qty), Sum(Qty2))

ValueListChart.png

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Here's how we used to do it before Alternate States.

Reload copies of your "alternate" dimensions into island tables, for as many alternative "groupings" as you want. In this example, two.

ProductIsland1:
LOAD
ProductName as ProductName1
Resident Products;

ProductIsland2:
LOAD
ProductName as ProductName2
Resident Products; 

Make listboxes or other selection mechanisms for the island fields.

In your Measure, use the set P() function to reference the island field.

Sum({<ProductName=P(ProductName1)>}LineSalesAmount) 

Sum({<ProductName=P(ProductName2)>}LineSalesAmount) 

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

P.S. If you see me in the bar you can ask me how we used to do this before Set Analysis.

smolly1621
Contributor II
Contributor II
Author

Thanks, this really help! However, I've realized a new criteria - on the same page I need to add filters that will impact all of my Data Islands. 

For example: user wants to first filter to a specific product category such as clothing vs. homegoods and filter to a specific price range. Then use the filters created above by the data islands to filter to specific products in that category. 

Dalton_Ruer
Support
Support

If you utilize Rob's suggestion above so that ONLY the products (fields you don't want in common) are in the islands, then you can still allow the fields from the DEFAULT STATE to impact your totals, while still isolating the products

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I could give a suggestion here...but before we go further down the rabbit hole can we revisit why alternate states would not be a workable solution?  The viz would not need to be in an alternate state, only the listboxes would be.  The viz measures would reference the state and I don't know of any limitation there. 

Sum({State1}Sales)

Sum({State2}Sales)

-Rob

smolly1621
Contributor II
Contributor II
Author

The theme for my dashboard requires the grouped container extension. To use the grouped container extension, visuals have to be master items. Alternate state visuals cannot be turned into a master item and therefore aren't a viable solution to use in my dashboard. 

 

Working to build the listboxes now, taking sometime to figure out as I've never made them before, but it sounds like that won't be viable given it's an alternate state?

 

 

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The way I propose is that the visualization would not be in an alternate state. Only the filters would be in an alternate state.

-Rob