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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

stacked barchart

Hi

I have stacked bar chart with 2 dimension and one expression.

percenatge.jpg

In above chart we want to display percentage for bars 100% similarly for all the bars.

Suggest some ideas, if i am creating a different charts for each dimension field for ex: C(dimension field in chart) then i am getting the output but it is not a suitable way. As per requirement it should display 100% for all dimension field and in same chart.

Thanks

Manish Madan

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Your Expression should be like below

SUM(YourMeasureFieldName)/SUM(Total <YourFirstDimension>YourMeasureFieldName)

View solution in original post

13 Replies
MK_QSL
MVP
MVP

Your Expression should be like below

SUM(YourMeasureFieldName)/SUM(Total <YourFirstDimension>YourMeasureFieldName)

Anonymous
Not applicable
Author

Hi Manish

Please find attached sample app.

Can you please help.

Thanks

MK_QSL
MVP
MVP

Attachment Missing !!

Or may be for authentication 😞  

Anonymous
Not applicable
Author

sorry,

PFA..

MK_QSL
MVP
MVP

Not clear from you apps. What you want to achieve? Please clarify !

Update : use below expressions

=count({<[Entity_Emp_Scale]= >}if((Zone)='A',Entity_Emp_Scale))/count(TOTAL {<[Entity_Emp_Scale]= >}if((Zone)='A',Entity_Emp_Scale))

=count({<[Entity_Emp_Scale]= >}if((Zone)='M',Entity_Emp_Scale))/count(TOTAL {<[Entity_Emp_Scale]= >}if((Zone)='M',Entity_Emp_Scale))

OR

=count({<[Entity_Emp_Scale]= >}if((Zone)='A',Entity_Emp_Scale))/count(TOTAL <Zone> {<[Entity_Emp_Scale]= >}if((Zone)='A',Entity_Emp_Scale))

=count({<[Entity_Emp_Scale]= >}if((Zone)='M',Entity_Emp_Scale))/count(TOTAL <Zone> {<[Entity_Emp_Scale]= >}if((Zone)='M',Entity_Emp_Scale))

or Single Expression (Thanks Ruben Marin)

COUNT({<Zone = {'A','M'}>}Entity_Emp_Scale)/COUNT(TOTAL <Zone> {<Zone = {'A','M'}>}Entity_Emp_Scale)

rubenmarin

Hi Manish,

Ckeck attached file and see if that's what you want.

I used the formula Manish said and with a bit changes on dimensions and expressions.

Anonymous
Not applicable
Author

ok..

I have attached another app same as screenshot i shared earlier in that i want for each dimension field data share appear out of 100%.

Don't know why i am facing issue in uploading the file,can u share ur email address.

MK_QSL
MVP
MVP

Use below expression

Count(Entity_Emp_Scale)/Count(Total <Zone> Entity_Emp_Scale)

Untick Relative...

go to number tab and tick show in percentage

UPDATE : File Enclosed..

Anonymous
Not applicable
Author

Hi Ruben,

can you please give a try with my 2nd attachment.

Thanks

Manish Madan