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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
manoranjan_d
Specialist
Specialist

3 stack bar with value low to high

hi all, below is the data,

now i need the data in 3 stack bar in single chart.

First  stack bar should tell the sum of IT and CSE

second stack bar should tell the Sum of IT present and Absent

third stack bar should tell the the sum of cse present and absent

note: all these values in the stack bar stock display inside the segment and  the values should sort low to high.

 

DeptCountPorA
IT500A
CSE700A
IT800A
CSE900A
IT1000A
CSE1100A
IT1200A
CSE1300A
IT1400P
CSE1500A
IT1600P
CSE1700P
IT1800P
CSE1900P
IT2000P
CSE2100P
IT2200P
CSE2300P
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Create a Bar Chart

Use two Calculated Dimensions

1) =ValueList('All','IT','CSE')

2) =ValueList('A','P')

Use below Expression

IF(ValueList('All','IT','CSE') = 'All' and ValueList('A','P') = 'A', SUM({<PorA = {'A'}>}Count),

IF(ValueList('All','IT','CSE') = 'All' and ValueList('A','P') = 'P', SUM({<PorA = {'P'}>}Count),

IF(ValueList('All','IT','CSE') = 'IT' and ValueList('A','P') = 'A', SUM({<PorA = {'A'}, Dept = {'IT'}>}Count),

IF(ValueList('All','IT','CSE') = 'IT' and ValueList('A','P') = 'P', SUM({<PorA = {'P'}, Dept = {'IT'}>}Count),

IF(ValueList('All','IT','CSE') = 'CSE' and ValueList('A','P') = 'A', SUM({<PorA = {'A'}, Dept = {'CSE'}>}Count),

IF(ValueList('All','IT','CSE') = 'CSE' and ValueList('A','P') = 'P', SUM({<PorA = {'P'}, Dept = {'CSE'}>}Count)))))))

View solution in original post

13 Replies
manoranjan_d
Specialist
Specialist
Author

in the stack bar i need the IT and CSE has to segregated

manoranjan_d
Specialist
Specialist
Author

no reply

MK_QSL
MVP
MVP

Like this?

MK_QSL
MVP
MVP

Or simple create a Bar Chart

Dimension : No Dimension

Expressions

1) SUM(Count)

2) SUM({<Dept = {'IT'}, PorA = {'P','A'}>}Count)

3) SUM({<Dept = {'CSE'}, PorA = {'P','A'}>}Count)

Go to Style Tab and Select Stacked From SubType

manoranjan_d
Specialist
Specialist
Author

no wrong , i need separate stack bar

MK_QSL
MVP
MVP

Create a Bar Chart

Use two Calculated Dimensions

1) =ValueList('All','IT','CSE')

2) =ValueList('A','P')

Use below Expression

IF(ValueList('All','IT','CSE') = 'All' and ValueList('A','P') = 'A', SUM({<PorA = {'A'}>}Count),

IF(ValueList('All','IT','CSE') = 'All' and ValueList('A','P') = 'P', SUM({<PorA = {'P'}>}Count),

IF(ValueList('All','IT','CSE') = 'IT' and ValueList('A','P') = 'A', SUM({<PorA = {'A'}, Dept = {'IT'}>}Count),

IF(ValueList('All','IT','CSE') = 'IT' and ValueList('A','P') = 'P', SUM({<PorA = {'P'}, Dept = {'IT'}>}Count),

IF(ValueList('All','IT','CSE') = 'CSE' and ValueList('A','P') = 'A', SUM({<PorA = {'A'}, Dept = {'CSE'}>}Count),

IF(ValueList('All','IT','CSE') = 'CSE' and ValueList('A','P') = 'P', SUM({<PorA = {'P'}, Dept = {'CSE'}>}Count)))))))

manoranjan_d
Specialist
Specialist
Author

is this only one expression

MK_QSL
MVP
MVP

Yes

manoranjan_d
Specialist
Specialist
Author

thanks manish, but can u expalin the expression