Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
tinapullen1
Contributor
Contributor

Expression total monthly number excluding a dimension

Hi, 

Below is an extract from 12 months of data I have in QlikView:

Month     Temp count     Rag Status

May           46                        Red

May           283                      Amber

May            1001                 Green

I want to be able to produce a stacked bar chart that shows as a percentage of the total temp count for each month.  But I'm struggling to work out how to get the total temp count as an expression by month.

e.g. what I want is 

Month     Temp count    Rag status      Total temp count    %

May          46                        Red                    1330                             4%

May          283                      Amber              1330                            21%

May          1001                    Green                1330                            75% 

 

Could you please help me with the total temp count which is a total of the temp count for the month?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

This?

count(Total <MonthField> [incident type] )

View solution in original post

7 Replies
tresesco
MVP
MVP

Try like:

Count( Total [Temp count])

tinapullen1
Contributor
Contributor
Author

Thank you for replying but this just gives me 0 on all the total temp count lines?

tresesco
MVP
MVP

If the field name is right, the expression should work. Could you share a screen shot of the field and chart output?

tinapullen1
Contributor
Contributor
Author

Almost there I think!  The temp count is an expression....count[Incident type]

So I have done the new expression as count(Total[incident type] which has given me a total of all the incident types in the data set (total of 25338), now I would only like this total to be the month total (e.g. May = 1330) as I have 12 months data 

tinapullen1
Contributor
Contributor
Author

Hi, I have attached example - so where I have highlighted yellow (May data) I would like to see the number 1330, for June I have circled I would like to see 1346 

tresesco
MVP
MVP

This?

count(Total <MonthField> [incident type] )

tinapullen1
Contributor
Contributor
Author

Brilliant!  Thank you so much