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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
sspawar88
Creator II
Creator II

Issue in Stack Bar Chart

Hi Community,

I used  Bar chart &

1)dimension-->branch_type

2)calculated dimension-->

if(match(branch_type,'DEPOT','FACTORY','PT','ST'),

(

if(Flag='RED','1',

if(Flag='YELLOW','2',

if(Flag='AMBER','3',

if(Flag='GREEN1','4'

))))))

----------------------------------------------------------------------------

RED--->param_value=<=-1 and param_value=>=-10

YELLOW--->param_value=<=-10.1 and param_value=>=-13.9

AMBER--->param_value=<=-14 and param_value=>=-17.9

GREEN--->param_value=<=-20

(Above are only names of color which are taken by creating Flag in script)

----------------------------------------------------------------------------

3) Expression

Count({$<param_name={'TEMP'},param_value={'<=-1'}>}param_value)/

Count(total <branch_type>{$<param_name={'TEMP'},param_value={'<=-1'}>}param_value)*100

it gives 400% which is wrong.

11111.PNG

it should be 100% and there are diffrerent proportion for stacks for each branch_type


12 Replies
sspawar88
Creator II
Creator II
Author

actually it wont work in Qlik sense and other serious thing is that it works in Qlikview for same script and same data model.

and one more issue is that param_value range is different for different branch_types.

and branch_types locates in branch table.

and param_value in tx_data table.

and these two tables are not connected directly to each other.

how can i get the exact param_color for branch_types?

please suggest me.

daniel_kusiak
Creator II
Creator II

Count({$}param_value)/Count(total <branch_type>{$}param_value)*100 for each flag=100

You have four flags so it's 400 in stacked chart (green2 is empty).

Same goes with the proportion.

sspawar88
Creator II
Creator II
Author

No its not working.

when i put same Band(calculative dimension) and dimension which i mentioned above.

and put your expression in Expression.

it gives same 400%

i want 100% for each branch_type which consist four stack colors for their range counts.