Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pie Chart with multiple formulas

Hey to all,

I think this is an easy one for the experts 🙂

I want to show the data in the attachment as a pie chart. I don't need a dimension, but sum up all the three values and show the percentage of the total. Each column has an own formula

The result should look like this

- Lohnkosten Soll: 9,31% ==> 480,95/5.165,69

- Maschinenkosten Soll: 52,90% ==> 2.732,65/5.165,69

- Materialkosten Soll: 37,79% ==> 1.952,09/5.165,69

Thanks for any ideas 🙂

7 Replies
lironbaram
Partner - Master III
Partner - Master III

actualy

it quite easy

just build a chart with no dimensions and only expressions

and the pie will work automaticlay

swuehl
MVP
MVP

Your three expressions look like

=sum(Value1)

=sum(Value2)

=sum(Value3)

right?

Then maybe just divide each by the sum of the three:

=sum(Value1) /

rangesum(sum(Value1),sum(Value2), sum(Value3) )

...

Not applicable
Author

@swuehl

partly correct. I have the three expressions as you wrote

Am I right that I have to do 3 rangesum-expressions for each single value (Lohnkosten, Maschinenkosten,Materialkosten)?

A single rangesum works correct, but not the three expressions.

When I do this, I get the following error Error.jpg

swuehl
MVP
MVP

Sorry, I don't really get it.

You've got three expressions like this

Label: Lohnkosten

Exp: =sum(Lohnkosten)

Label: Maschinenkosten

Exp: =sum(Maschinenkosten)

Label: Materialkosten

Exp: =sum(Materialkosten)

Change your expressions to:

=sum(Lohnkosten) / rangesum( sum(Lohnkosten), sum(Maschinenkosten), sum( Materialkosten) )

=sum(Maschinenkosten) / rangesum( sum(Lohnkosten), sum(Maschinenkosten), sum( Materialkosten) )

=sum(Materialkosten) / rangesum( sum(Lohnkosten), sum(Maschinenkosten), sum( Materialkosten) )

It's quite hard to tell what your issue may cause, without knowing anything, and a screenshot is only marginally helpful.

Could you post a small sample app?

Not applicable
Author

Hi,

here is the sample app with the three expressions and the error

swuehl
MVP
MVP

I don't see an error (in addition also set the number format to percent):

Percentage20130815.PNG

Not applicable
Author

That's funny. I changed the number format to percent, but the error still occurs. But the way is right that I programmed the pie chart? I work with 11.2 SR2.