Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikSensor
Partner - Creator
Partner - Creator

Stacked bar chart

Hi, I want to have two bars (stacked) which show two states of a certain dimension. I tried the following, but it seems that the expression don't take the current filtering into account:

Count( {<State={'Done'}>} ID)

Count( {<State={'Open'}>} ID)

Is there something which I can improve to only count the current selection (e. g. if State = Open no bar with State=Done shall be shown)

Labels (3)
1 Solution

Accepted Solutions
LRuCelver
Partner - Creator III
Partner - Creator III

Ich konnte so ein leeres Chart auf nur zwei Arten nachstellen:

  1. Es sind Filter ausgewählt, die die in der Set Analysis angegebenen Werte ausschließen.
  2. Die in der Set Analysis angegebenen Werte sind falsch/anders geschrieben, als sie es im gefilterten Feld sind.

Überprüf am besten beides nochmal.

Theoretisch könnte es auch ein Problem im Datenmodell geben, dass alle Werte im Versions-Feld keine IDs für die ausgewählten States haben.

View solution in original post

7 Replies
LRuCelver
Partner - Creator III
Partner - Creator III

If you don't have a primary "Stack" dimension, use this instead to generate an "empty" dimension:

=' '

 Add the State field as the secondary "Bars" dimension.

If you have more than the two States, use this measure:

Count({<State -= E({<State = {'Done', 'Open'}>})>} ID)
QlikSensor
Partner - Creator
Partner - Creator
Author

Hi, I didn't get this. My dimension is SoftwareVersion. And I have two "Kennzahlen" (don't know the english word) which I want to show as stacked bars:

Count( {<State={'Done'}>} ID)

Count( {<State={'Open'}>} ID)

You want me to define an empty dimension like =' ' but my dimension is SoftwareVersion

LRuCelver
Partner - Creator III
Partner - Creator III

We just need any dimension as a first/group dimension so we can use State as the dimension for the stack-segments.

If you have a dimension, use it. The expression works regardless:

LRuCelver_0-1710861613434.png

 

QlikSensor
Partner - Creator
Partner - Creator
Author

Hi, I have done it now in this way, but the graph shows literally nothing although the axis description looks similar to yours.

QlikSensor_1-1710919083767.png

QlikSensor_2-1710919168437.png

 

 

 

LRuCelver
Partner - Creator III
Partner - Creator III

Ich konnte so ein leeres Chart auf nur zwei Arten nachstellen:

  1. Es sind Filter ausgewählt, die die in der Set Analysis angegebenen Werte ausschließen.
  2. Die in der Set Analysis angegebenen Werte sind falsch/anders geschrieben, als sie es im gefilterten Feld sind.

Überprüf am besten beides nochmal.

Theoretisch könnte es auch ein Problem im Datenmodell geben, dass alle Werte im Versions-Feld keine IDs für die ausgewählten States haben.

QlikSensor
Partner - Creator
Partner - Creator
Author

Got it, you are richt, the values in the Set Analysis statement were wrong. Perfect. Thank you so much. Just a last question: is it possible to manage the colors of the shown states?

LRuCelver
Partner - Creator III
Partner - Creator III

Kind of. You can change the colors but lose the legend:

LRuCelver_0-1710948510130.pngLRuCelver_1-1710948562035.png