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: 
peschu123
Partner - Creator III
Partner - Creator III

Chart with dimension value in set expression

Hi,

I have a problem and I'm sure somebody can help me.

I have a stacked Bar/line chart.

Dimension is: Month

Because of the combination of bar and line I can't use a second dimension.

So I have 4 Expressions for my stacked bar and 1 expression for the line.

My Expression look like:

sum({<Datetype={'Delivery'},[Order Type]={'type1'}>}Order_Counter)

sum({<Datetype={'Delivery'},[Order Type]={'type2'}>}Order_Counter)

....

This works all good. Now comes the problem:

I create a listbox for [Order Type]

If I select only 'type1', my chart doesn't care and shows me all 4 order types.I would expect that it shows only the part/values for 'type1' in my chart.

Is there a way to change the set expression accordingly? I think with an  expression and some IFs, as condition for the expression I could "solve" this. But it seems not really good to me.

And I would like to understand this behaviour, to learn something new.

I hope someone can help me and best regards,

Peter

1 Solution

Accepted Solutions
Nicole-Smith

Change your expressions to have set analysis that looks like this:

sum({<Datetype={'Delivery'},[Order Type]=P([Order Type])*{'type1'}>}Order_Counter)

Example file is also attached.

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Interesting question...

can you post sample data or sample apps?

its_anandrjs
Champion III
Champion III

Give some sample data or you can type your set expression in the straight table without any label then there you can see expression part and values if i understand clearlly.

peschu123
Partner - Creator III
Partner - Creator III
Author

Hi,

this is part of my corporate dashboard. Never faced this problem before.It has now become a matter when I began to use dynamic dimensions. The "problem was already there but the selection was not meaningful in any way.

I will try to make a sample qvw, but I can't promise to deliver it today.

@Anand I don't need a straight table I see it clearly in front of me in my chart. I have a "total" expression (without set analysis) for just showing the sum. This value is always correct..

But the set expression ignores the selection when I select a value in the same field.

Nicole-Smith

Change your expressions to have set analysis that looks like this:

sum({<Datetype={'Delivery'},[Order Type]=P([Order Type])*{'type1'}>}Order_Counter)

Example file is also attached.

peschu123
Partner - Creator III
Partner - Creator III
Author

Thank you all very much for your help and especially Nicole for the solution!

This solves my issue exactly. I played around with p() before, but didn't got it to work here.

Made my day..cheers!!

Edit:  I can't stop qliking around in my dashboard now, great.