Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pkelly
Specialist
Specialist

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

1 Solution

Accepted Solutions
sunny_talwar

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
sunny_talwar

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.

Not applicable

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] )

sunny_talwar

Yay!!! we both agree with each other

PradeepReddy
Specialist II
Specialist II

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

pkelly
Specialist
Specialist
Author

Thanks Sunny T...

sunny_talwar

No problem at all

Not applicable

glad I was able to help

jlampard40
Contributor III
Contributor III

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