Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

Club two expressions from a set of 4 into a stacked bar chart

Hi,

I have a requirement to display the following in a bar chart.

Dimension:

Month

Expressions:

1. Open Tickets

2. Closed tickets

3. Open tickets for department A

4. Closed tickets for department A

The bar chart should have two bars " Open ticket and Closed ticket" being displayed for a single dimension "Month" but the bars should be stacked and display 'Open tickets for department A' and 'Closed tickets for department A' in the respective two bars itself.

Looking for a solution to this problem. Is it feasible?

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Club two expressions from a set of 4 into a stacked bar chart

I think you'll need to create either a new dimension in the script or a synthetic dimension. See attached example.


talk is cheap, supply exceeds demand
9 Replies
MVP & Luminary
MVP & Luminary

Re: Club two expressions from a set of 4 into a stacked bar chart

Can you post a qlikview document that demonstrates the problem?


talk is cheap, supply exceeds demand
Not applicable

Re: Club two expressions from a set of 4 into a stacked bar chart

Hi Gysbert,

Won't be able to attach the data/qvw but attaching a snapshot of how the bar chart looks for the four expressions. (Snip.jpg)

Snip.JPG

The data for 'Dept A Open' and 'Dept A Closed' is a subset of the entire data set for 'Open tickets' and 'Closed tickets' respectively.

The objective is to try and show the subsets in a pair of bars for the 'Open tickets' and 'Closed tickets' (Snip2.jpg) as a stacked bar chart generally looks like

Snip 2.JPG

MVP & Luminary
MVP & Luminary

Re: Club two expressions from a set of 4 into a stacked bar chart

Can you post a source data file and the expressions you used?


talk is cheap, supply exceeds demand
Not applicable

Re: Club two expressions from a set of 4 into a stacked bar chart

Sorry, won't be able to post the data here either.

Following expressions were used to derive the first graph

Count( {<[Type]={'Open'}>} DISTINCT [Ticket No.])

Count( {<[Type]={'Closed'}>} DISTINCT [Ticket No.])

Count( {<[Dept]={'A'}, [Type]={'Open'}>} DISTINCT [Ticket No.])

Count( {<[Dept]={'A'}, [Type]={'Closed'}>} DISTINCT [Ticket No.])

MVP & Luminary
MVP & Luminary

Re: Club two expressions from a set of 4 into a stacked bar chart

Sorry, but I still don't understand. You want two bars, yes? One Open and one Closed. Then you want Stacked segments for Dept A in both the Open and Closed bars . But with only one department... there's nothing to stack.


talk is cheap, supply exceeds demand
Not applicable

Re: Club two expressions from a set of 4 into a stacked bar chart

Yes, the requirement is two bars. The value for Dept A is essentially a subset of the total value being depicted in both the Open and Closed bars. The Dept A value needs to be made visible in the Open and Closed bars with a different colour so that it can be identified.

MVP & Luminary
MVP & Luminary

Re: Club two expressions from a set of 4 into a stacked bar chart

I think you'll need to create either a new dimension in the script or a synthetic dimension. See attached example.


talk is cheap, supply exceeds demand
aveeeeeee7en
Valued Contributor III

Re: Club two expressions from a set of 4 into a stacked bar chart

Incredible Stuff.

Gysbert Sir you Beauty.

Regards

Av7eN

Not applicable

Re: Club two expressions from a set of 4 into a stacked bar chart

Amazing!

Works perfect..

Thanks for sharing this very useful concept!