Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Different selections for two expressions in a chart

I want to make a chart with 2 expressions - Sales and Cost. The way the data is structured, i need different filters on these two to get the right number. For instance, I have two fields "A" and "B" with values "y" and "n" for both. I want "y" to be selected for both A & B to get the right Cost, and don't want any filters on for Sales.

Now if i have a list box and select the "y"s for both A and B, i'd get the right cost but my sales number is off. Is there a way i can work around this? Tried putting an if condition in the expression and calculation condition too but it didn't help.

1 Reply
nilesh_gangurde
Partner - Specialist
Partner - Specialist

In this case you need to ignore the selections of Sales.

here is the syntax for both cost and sales using set analysis.

For Cost:

Sum(CostField)

For Sales:

Sum({<A=,B=>}Sales)

In the Sales expression we are ignoring the selections made in the Field A and B. at the same time the cost will change according to selections.

Hopw this will help.

-Nilesh