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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
adambrian
Contributor III
Contributor III

Stack Bar Graph with Total

Hey guys,

I'm new in qlik sense, can anyone help me this one. Sorry if this has been answered before, I couldn't find the answer related.

I want show a stack bar graph with total workers by category, bar show full, and show in percent. Like this :

2017-03-12 17_36_46-photo_2017-03-06_11-28-29.jpg ‎- Photos.png

I try to create a company in one country with many braches on difference state. Total Branches in one State are diferrence, it based on which state we choose..

For example i choose State_A it will be like this:

2017-03-12 17_38_40-urgent - My new sheet (1) (1) _ App overview - Qlik Sense.png

and if i choose State_B it will be like this :

2017-03-12 17_45_23-_urgent - My new sheet _ App overview - Qlik Sense.png

Graph will show based total branches in state which i selected. I tried using this extension, but it don't have stack bar graph.
GitHub - miclae76/trellis-chart: Qlik Sense Trellis Chart Extension
Can anybody help this one?


stalwar1jpemtovinieme12reddys310

This is app that I tried to do : !

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Try a dual expression

example

=DUAL(

'No of Workers:' & sum([TOTAL WORKERS]) & chr(10) &

'%of Workers:' & Num(sum([TOTAL WORKERS]) /sum(TOTAL  <DEPARTMENT> [TOTAL WORKERS]),'##.0%')

,

sum([TOTAL WORKERS]) /sum(TOTAL  <DEPARTMENT> [TOTAL WORKERS])

)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

12 Replies
Anonymous
Not applicable

vinieme12
Champion III
Champion III

add a Dummy Dimension as below

DummyDIM:

LOAD RowNo() as DIM

AutoGenerate (2);

inChart

Use Calculated Dimension

=Pick(DIM,'TOTAL',DEPARTMENT)

Expression

sum([TOTAL WORKERS]) /sum(TOTAL  <DEPARTMENT> [TOTAL WORKERS])

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
adambrian
Contributor III
Contributor III
Author

Hi vinieme12,

Thanks for your answer. I tried your solution and it show total, but almost what i wanted. Can you help me.

Here the result with your solution,

2017-03-14 10_25_28-_TriedThisOne - My new sheet (1) _ Sheets - Qlik Sense.png

1) TOTAL not show as dimension that i used.

2) Why Count for bar chart not same with real one?

vinieme12
Champion III
Champion III

Your dimensions are not correct, just keep the below two

Dimension1: =Pick(DIM,'TOTAL',DEPARTMENT)

Dimension2: UNIT


<< You don't need pick() for UNIT dimension

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
adambrian
Contributor III
Contributor III
Author

Hi vinieme12‌,

Thank it works.. But i need you to help me to change a little..

Below is the result after i change dimension.

What I need :
1) When i hover at bar, Can i see in UNIT by percentage and TOTAL WORKERS? each bar show percentage and TOTAL WORKERS

2017-03-14 16_30_56-Draft - My new sheet (4) (1) _ App overview - Qlik Sense.png

vinieme12
Champion III
Champion III

Try a dual expression

example

=DUAL(

'No of Workers:' & sum([TOTAL WORKERS]) & chr(10) &

'%of Workers:' & Num(sum([TOTAL WORKERS]) /sum(TOTAL  <DEPARTMENT> [TOTAL WORKERS]),'##.0%')

,

sum([TOTAL WORKERS]) /sum(TOTAL  <DEPARTMENT> [TOTAL WORKERS])

)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
adambrian
Contributor III
Contributor III
Author

your expression become like this one..

what i really want like this :
unitD : 21%
TOTAL WORKRES : 123

It show two detail in time. Can you help me to show like this?

2017-03-14 19_30_25-_TriedThisOne _ Sheets - Qlik Sense.png

vinieme12
Champion III
Champion III

Give a name to your measure

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III
Champion III

I don't work with Qlik Sense, but after reading other threads for custom popups in sense...this doesn't seem possible at the moment

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.