Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

pkelly
Valued Contributor

Stacked Bar Chart - Show % as % of Month Total

Hi all...

For Forum.png

I am adding a stacked bar chart to an app and have got as far as the above.

The issue I have is that the % being displayed appear to be a % of all the data.

What I want to show is, for each month, each segment as a % of the total for that month.

The % against each month would therefore equal 100%.

Any help gratefully appreciated.

Thanks

Paul

Tags (1)
1 Solution

Accepted Solutions

Re: Stacked Bar Chart - Show % as % of Month Total

What is the expression you are using here? I will try to help you with an example here and then you can implement the change in your expression as needed

Lets say the expression you are using is

Sum(Sales)/Sum(TOTAL Sales)

You just need to change the above expression to this:

Sum(Sales)/Sum(TOTAL <MonthYear> Sales) -> Where MonthYear is your 1st dimension on the chart above

NOTE: Don't use QlikView's relative option to show percentage for your case because I don't think that is going to work here.

View solution in original post

8 Replies

Re: Stacked Bar Chart - Show % as % of Month Total

What is the expression you are using here? I will try to help you with an example here and then you can implement the change in your expression as needed

Lets say the expression you are using is

Sum(Sales)/Sum(TOTAL Sales)

You just need to change the above expression to this:

Sum(Sales)/Sum(TOTAL <MonthYear> Sales) -> Where MonthYear is your 1st dimension on the chart above

NOTE: Don't use QlikView's relative option to show percentage for your case because I don't think that is going to work here.

View solution in original post

Not applicable

Re: Stacked Bar Chart - Show % as % of Month Total

If I understand, you want to do something like the sample below - each bar add up to 100 percent.

The exprssion I used

count ({$*<set analysis syntax if needed >}[Aged Status] ) /
count ({$*set analysis syntax if needed >}TOTAL<Team>[Aged Status] )

Re: Stacked Bar Chart - Show % as % of Month Total

Yay!!! we both agree with each other

pradeepreddy
Valued Contributor II

Re: Stacked Bar Chart - Show % as % of Month Total

Sum(Sales)/Sum(Total <MonthYear_Field> Sales)

pkelly
Valued Contributor

Re: Stacked Bar Chart - Show % as % of Month Total

Thanks Sunny T...

Re: Stacked Bar Chart - Show % as % of Month Total

No problem at all

Not applicable

Re: Stacked Bar Chart - Show % as % of Month Total

glad I was able to help

jlampard40
New Contributor III

Re: Stacked Bar Chart - Show % as % of Month Total

Hi guys - I have similar problem.  Can't get any of the above to work.  Basically want to show the same kind of thing.  My set analysis is this:

=count({<[AD Modality]-={X,Z,P},[AD Activity or Demand]={'Activity'}>}[AD CRIS No.])/
count({<[AD Modality]-={X,Z,P},[AD Activity or Demand]={'Activity'}>}TOTAL<Period>[AD CRIS No.])

 

I'm basically using set analysis to exclude X,Z and P (hospital terms) and to only show Activity. This set analysis works well as I've used it elsewhere.  I'm counting by number of CRIS No. (AD CRIS No.) codes.

Where I'm failing is trying to show each Period as a stacked chart, to show how each modality is made up in % terms.  I'm not getting anywhere...really appreciate your help guys!  Rgds