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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

100% Stacked Bar Graph

Hi,

I'm having trouble getting a 100% Stacked bar graph working.

I have 2 dimensions:

Month

Hour Range

The Hour Range consists of: 0-4, 4-8, 8-12, 12 +

I would like a graph that shows for each month what percentage is made up of which hour rage.

Hope this makes sense. I can't seem to get the expression to work.

Thanks in advance.

Simon

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     I think here you should use count instead of sum

     Count(TimeGroup)/Count(Total <ATAMonth> TimeGroup)

     ATAMonth should be dimension

Celambarasan

View solution in original post

6 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

Try SUM(Sales)/SUM(TOTAL <Month> Sales)

Month should be the first dimension, then Hour Range.

Hope this helps,

Jason

Not applicable
Author

Thanks for the quick reply, but no joy.

I'll try and be more descriptive.

I have a field called ATAMonth which can contain each month i.e Apr, May, Jun, July etc..

I also have a field TimeGroup which can contain '0-4', '4-8', '8-12', 12+

I would like a stacked graph that shows each month and the percentages for each TimeGroup.

This is how I have converted your example, but it does not disaplay the data. Is this correct?

SUM(TimeGroup)/SUM(TOTAL <ATAMonth> TimeGroup)

Cheers

Simon

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     I think here you should use count instead of sum

     Count(TimeGroup)/Count(Total <ATAMonth> TimeGroup)

     ATAMonth should be dimension

Celambarasan

jagan
Partner - Champion III
Partner - Champion III

Hi,

As Celambarasan said it should be count, if you need sum, there must be cause which has Time from which the TimeGroup is arrived.  Check table whether there is any field.

Regards,

Jagan.

Jason_Michaelides
Partner - Master II
Partner - Master II

It'll be something along these lines. If you can post your app we can provided more reliable help.

Not applicable
Author

Thank you all for your help.

Changing it to count worked once I deleted my graph and recreated it.

Thank you once again,

Simon