Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

michielvandegoo
Valued Contributor

Grouped bar, 2 dim, values as 100% of 1 of the dim

I need to have a stacked bar where I have:

Year

Dim2

Sum(measure)

I want to show the Sum(measure) for Dim2 as 100% of Year total.

stackedbar.jpg

each bar should be 100% for each corresponding year.

I cannot get this to work.

If I add aggr I only get the total for 1 of the Dim2, not for each Dim2.

Thanks for the help

Tags (1)
1 Solution

Accepted Solutions

Re: Re: Stacked bar, 2 dim, values as 100% of 1 of the dim

Like this?

8 Replies

Re: Stacked bar, 2 dim, values as 100% of 1 of the dim

Like This?

Not applicable

Re: Stacked bar, 2 dim, values as 100% of 1 of the dim

Try to invert the order of the dimensions...

Hope this helps

MC

carlos_reyes_qv
Valued Contributor

Re: Stacked bar, 2 dim, values as 100% of 1 of the dim

Another example.

Edit.. Example updated.

michielvandegoo
Valued Contributor

Re: Stacked bar, 2 dim, values as 100% of 1 of the dim

No.

For year 2012 the the 5 values of Dim2 need to be calculated against the total for year 2012.

Then I want to see in each Dim2 3  bars representing the 3 selected years.

The bars for each year are accumulated 100%.

So the bars represent the % like this in straight table form:

Dim2     Year     Value     %

1          2012     10          10%

2          2012     15          15%

3          2012     40          40%

4          2012     15          15%

5          2012     10          10%

1          2013     10          10%

2          2013     10          10%

3          2013     45          45%

4          2013     15          15%

5          2013     10          10%

etc

michielvandegoo
Valued Contributor

Re: Grouped bar, 2 dim, values as 100% of 1 of the dim

I meant a grouped bar

Re: Re: Stacked bar, 2 dim, values as 100% of 1 of the dim

Like this?

Not applicable

Re: Grouped bar, 2 dim, values as 100% of 1 of the dim

did you try sth like:

sum(Amount)/sum(Total <YEAR> Amount)

?

Fabrice

veidlburkhard
Contributor III

Re: Grouped bar, 2 dim, values as 100% of 1 of the dim

Hi Michiel,

try this expression: Sum(measure) / Sum(TOTAL<Dim2>  measure)

and on the 'Numbers' tab click on 'Show in Percent (%)'.

Enjoy

Burkhard

Community Browser