Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter

Hello,

I'm having a pivot table with expression which has negative, 0 and positive values. I want to give a button and on click of that button I want to have my users see only the rows with this expression having 0 values. How would I do that?

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Consider you have below data

Load * Inline

[

  Item, PurchaseCost, SalesCost

  A, 100, 100

  B, 120, 150

  C, 90, 135

  D, 1200, 1100

  E, 1000, 1100

  F, 500, 500

  G, 200, 200

];

and after clicking the button, you want to show only Items A,F,G where TotalPurchaseCost and TotalSalesCost are same.. You can use as below

Create a button

Add Action

Select in Field

Field

Item

Search String

='=SUM(PurchaseCost)-SUM(SalesCost)=0'

View solution in original post

6 Replies
MK_QSL
MVP
MVP

Consider you have below data

Load * Inline

[

  Item, PurchaseCost, SalesCost

  A, 100, 100

  B, 120, 150

  C, 90, 135

  D, 1200, 1100

  E, 1000, 1100

  F, 500, 500

  G, 200, 200

];

and after clicking the button, you want to show only Items A,F,G where TotalPurchaseCost and TotalSalesCost are same.. You can use as below

Create a button

Add Action

Select in Field

Field

Item

Search String

='=SUM(PurchaseCost)-SUM(SalesCost)=0'

Not applicable
Author

Thanks Manish!! It works. I want to use the same button to toggle between 0 and Non zero values, is this possible?

alkesh_sharma
Creator III
Creator III

Put the same expression

For Negative Values:

=SUM(PurchaseCost)-SUM(SalesCost)<0'


For Positive Values

=SUM(PurchaseCost)-SUM(SalesCost)>0'

Not applicable
Author

How would first click of a button be positive and second click of a button be negative? I want to use only one button but different action.

alkesh_sharma
Creator III
Creator III

Create Two Buttons, Place them exactly over one another. and conditional hide and show them accordingly.

alkesh_sharma
Creator III
Creator III

Please find the file attached for your reference.