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: 
estebanafonso
Contributor II
Contributor II

2 KPIS with a common filter and a separate filters

Hi,

I have come across this use case multiple times and can not come up with a solution.  Suppose I am building two KPIs, same calculation, but require a common filter (say product type) so we can compare by products, but separate filters, say countries, so that we can compare values of this kpi by product for the two different selected groups of companies?

Any ideas how something like this could be accomplished?  The issue I have is when I create two separate tables, I can't get them to apply a common filter, but when I join the tables I can't apply a separate country filter for each one. 

3 Solutions

Accepted Solutions
Steven_Haught
Creator III
Creator III

@estebanafonso 

I think that this may be a good case use for alternate states. 

Set up information can be found here:

https://help.qlik.com/en-US/sense/September2020/Subsystems/Hub/Content/Sense_Hub/Visualizations/alte...

 

View solution in original post

Steven_Haught
Creator III
Creator III

A great webinar on alt dimensions and states can be found here:

https://event.on24.com/eventRegistration/EventLobbyServlet?target=reg20.jsp&referrer=&eventid=224868...

201 Tips and Tricks by Cullin Tripp

View solution in original post

jwjackso
Specialist III
Specialist III

Use Alternate States 

Create an alternate state like "ComparisonCountryFilter".  Assign the Alternate state to the filter and KPI that will have the comparison country.  In the KPI, use something like this

=Count({<Country=P({[ComparisonCountryFilter]}Country)>}Something)

It is saying that you will count Something where Country is equal to all the Possible Countries selected in the Alternate State filter.

View solution in original post

5 Replies
Steven_Haught
Creator III
Creator III

@estebanafonso 

I think that this may be a good case use for alternate states. 

Set up information can be found here:

https://help.qlik.com/en-US/sense/September2020/Subsystems/Hub/Content/Sense_Hub/Visualizations/alte...

 

Steven_Haught
Creator III
Creator III

A great webinar on alt dimensions and states can be found here:

https://event.on24.com/eventRegistration/EventLobbyServlet?target=reg20.jsp&referrer=&eventid=224868...

201 Tips and Tricks by Cullin Tripp

jwjackso
Specialist III
Specialist III

Use Alternate States 

Create an alternate state like "ComparisonCountryFilter".  Assign the Alternate state to the filter and KPI that will have the comparison country.  In the KPI, use something like this

=Count({<Country=P({[ComparisonCountryFilter]}Country)>}Something)

It is saying that you will count Something where Country is equal to all the Possible Countries selected in the Alternate State filter.

jwjackso
Specialist III
Specialist III

In my formula

=Count({<Country=P({[ComparisonCountryFilter]}Country)>}Something)

You only need to use the Alternate state in the filter, not the KPI.

 

estebanafonso
Contributor II
Contributor II
Author

Alternate states worked beautifully, and I know what they're used for, thank you