Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
brucejensen
Contributor III
Contributor III

Conditional Expression on Stacked Chart

I have a stacked bar chart where my dimension is Quarter and my Expressions are totals of various departments (Claims, Underwriting, etc.) When a user selects a Department from the multi box, I'd like the chart to change and just show the department selected. The default (no selections) would show all Departments.

From this:

chart before.jpg

To This:

chart after.jpg

I accomplished this using WildMatch(Concat([Roll-Up Dept],'/'),'Claims') but it has a couple problems. The default view is an empty chart. You have to select a Dept to view it. I'd like the default to show all depts. (the full stack like above). And it won't let me select multiple depts. I've seen this work on a table but can't get it to work on the stacked chart. Any help would be greatly appreciated!

1 Solution

Accepted Solutions
sunny_talwar

I would suggest to use The Crosstable Load to convert each department into a single column.... but with your current structure, you can use this for your conditional expressions.... for instance for Sum(Claims), use this:

=SubStringCount(Concat(DISTINCT  '|' &[Roll-up Dept]) & '|', '|Claims|')

View solution in original post

6 Replies
sunny_talwar

What is your expression

sunny_talwar

Are you using set analysis on Department field? If you are, then you might need an asterisk before your equal sign

Implicit Set Operators


Sum({<Department *= {...}>}Measure)

brucejensen
Contributor III
Contributor III
Author

The expressions are Sum(Claims), Sum(Underwriting), etc. to make up the individual parts of the stack

brucejensen
Contributor III
Contributor III
Author

No b/c each expression is a dept itself. Sum(Claims), Sum(Underwriting), Sum(CCC)

sunny_talwar

I would suggest to use The Crosstable Load to convert each department into a single column.... but with your current structure, you can use this for your conditional expressions.... for instance for Sum(Claims), use this:

=SubStringCount(Concat(DISTINCT  '|' &[Roll-up Dept]) & '|', '|Claims|')

View solution in original post

brucejensen
Contributor III
Contributor III
Author

This worked perfectly! Thank you so much!