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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stacked bar chart : Calculated Bars

Greetings,

I have the following Stacked bar chart. (See picture). But i need to produce additional bars that are calculated based on others.

My Expression : Count(CRITICALITY)/count(Total<PRODUCT> CRITICALITY).

For example :

1 - If i want to create the total from A-F , within this same graph. It will be a 7th column.

2 - Create a Subtotal column just for E - F. within this same graph.

3 -  Or a combination of both.

13 Replies
sunny_talwar

So it seems that the attachment did not go through the first time, trying it again now

Not applicable
Author

The result is as expected but i would like to be clear on the concept. Please elaborate if possible.

  1. You created the Dim table.
  2. =Pick(Dim,IGS,'Total','SubTotal') . Created this new dimension.
  3. Wrote the expression :
    Pick(Dim,

       Count(MYNPS)/count(Total<IGS> MYNPS),

       Count(MYNPS)/count(Total<IGS> MYNPS),

        Count({<IGS = {'INSTALACION', 'REPARACIONES MOVILES'}>}MYNPS)/count({<IGS = {'INSTALACION',             'REPARACIONES MOVILES'}>} TOTAL <IGS> MYNPS))

What puzzles me is how 'Count(MYNPS)/count(Total<IGS> MYNPS)' is used exactly the same twice in the expression yet produces this Total Bar. I don't get how is achieved.

sunny_talwar

1) Yes, Dim table is a Island table which isn't connected to the data model and we can use it to drive as many additional columns as we want in your chart. Since we needed 2 extra, I added 1, 2, 3. 1 for the actual dimension and 2 more for the additional columns needed.

2) That is just the way to add additional dimensions in your chart

3) Think of these are two separate charts. One chart is with 2 dimensions and the other one is with only one dimension. So basically for TOTAL and SUBTOTAL bars, the only dimension is the second dimension whereas for IGS has two dimensions?

Does it make sense? If not, I am more than happy to try again

Best,

Sunny

Not applicable
Author

Thanks Sunny it is very clear now.