Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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
Employee
Employee

Re: Stacked Bar Chart

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

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

SUM( if(DEPT=F_DEPT,REJECT_QTY))

4 Replies

Re: Stacked Bar Chart

‌Hi,

please post sample data/app to demonstrate with.

regards

Marco

Employee
Employee

Re: Stacked Bar Chart

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
Valued Contributor

Re: Stacked Bar Chart

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!

Re: Stacked Bar Chart

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

Community Browser