Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Michiel_QV_Fan
Specialist
Specialist

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

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

8 Replies
MK_QSL
MVP
MVP

Like This?

Not applicable

Try to invert the order of the dimensions...

Hope this helps

MC

Carlos_Reyes
Partner - Specialist
Partner - Specialist

Another example.

Edit.. Example updated.

Michiel_QV_Fan
Specialist
Specialist
Author

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

Michiel_QV_Fan
Specialist
Specialist
Author

I meant a grouped bar

MK_QSL
MVP
MVP

Like this?

Not applicable

did you try sth like:

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

?

Fabrice

veidlburkhard
Creator III
Creator III

Hi Michiel,

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

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

Enjoy

Burkhard