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

Embed Filter into Chart

I'm trying to embed filters into bar charts and I can't seem to figure out which syntax is will work for this. It seems a fairly easy task.

Trying to show 2, side by side bar charts one showing open sales pipeline, and one showing a closed won status.

For both charts, the Dim is Region, and the Measure is TotalPrice.

I have tried so far based on searching:

Sum(if(StageName='Closed Won', TotalPrice))

If(StageName='Closed Won', Sum(TotalPrice))

The first option returns everything in the table, so its' not checking the If correctly.

The second one returns nothing at all.

Maybe I'm trying to over-simplify this.

2 Replies
Lisa_P
Employee
Employee

We can filter our data using Set Analysis. For your scenario, the Measures will be:
Sales Pipeline
Sum({<StageName=-{'Closed Won'}>}TotalPrice)
Closed Won
Sum({<StageName={'Closed Won'}>}TotalPrice)
JamesR
Contributor
Contributor
Author

Thank you! I will give that a try.