Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikacct20
Contributor
Contributor

If AND statement with a button

I need to create a button that has an and statement. It needs to be something like If(KPI=Revenue and Country = US,0,KPI)

So essentially when looking at the list of KPI's the revenue would be 0 when US is selected. KPI and Country are both filters I have to the left and KPI populates my table. Is there a way to make that specific KPI 0 with country US when the button is selected. I only know how to make one field work with the button at a time.

Labels (1)
2 Replies
Dalton_Ruer
Support
Support

Not sure why you are trying to use a button to essentially show a Value? 

Please check out a blog post I wrote called An Alternative to Alternatives in which I show you how to define "islands" for what you are trying to do. You simply create a simple INLINE script for your KPI's that include a name to show in a filter, and the formula you wish to use. 

http://qlikdork.com/2020/12/an-alternative-to-alternatives/

 

qlikacct20
Contributor
Contributor
Author

Because the table is already created with the KPIs and dimensions that need to be shown. I am creating the button because I want the data to 0 out for a certain KPI only when the country is selected. I figure the best way to do this is with a button. This cannot be done with the filters because I need the country filter to work for all KPI's when the US is not selected. I specifically just want the Revenue KPI only to be updated when Country US is selected.