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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stacked Bar Chart

Hello all,

I am trying to make this bar chart:

want.png

The escapes and catches each have two different expressions, so it is not working properly.


The escape's definition is: if(DEPT<>F_DEPT,SUM(REJECT_QTY))


Whereas the Catches definition is if(DEPT=F_DEPT,SUM(REJECT_QTY)).


Does anyone know how to do this?

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

Please adjust your expressions and set "stacked" at Style tab

SUM( if(DEPT<>F_DEPT,REJECT_QTY))

SUM( if(DEPT=F_DEPT,REJECT_QTY))

View solution in original post

4 Replies
MarcoWedel

‌Hi,

please post sample data/app to demonstrate with.

regards

Marco

Clever_Anjos
Employee
Employee

Please adjust your expressions and set "stacked" at Style tab

SUM( if(DEPT<>F_DEPT,REJECT_QTY))

SUM( if(DEPT=F_DEPT,REJECT_QTY))

jonas_rezende
Specialist
Specialist

Hi, Channing Dionisopoulos.

Try

Escape = Sum({<DEPT = {"=Sum(if(DEPT <> F_DEPT,REJECT_QTY))"}>} REJECT_QTY)

Catch = Sum({<DEPT = {"=Sum(if(DEPT = F_DEPT,REJECT_QTY))"}>} REJECT_QTY)

Hope this helps!

MarcoWedel

Hi,

possible solutions could be also:

QlikCommunity_Thread_185525_Pic1.JPG

  • calculated dimension

QlikCommunity_Thread_185525_Pic2.JPG

reducing your expression to simply

QlikCommunity_Thread_185525_Pic3.JPG

  • Expressions using set expressions instead of If() conditions:

QlikCommunity_Thread_185525_Pic4.JPG

QlikCommunity_Thread_185525_Pic5.JPG

hope this helps

regards

Marco