Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
Not applicable

In Script - group percentage values

Hi,

My data contain five different records to express a percentage value. for instance:

MyTable

Load Id,

          red.perc,

          yellow.perc,

          blu.perc,

          ...

FROM ....

red.perc, yellow.perc and blu.perc are float numbers such that red.perc+yellow.perc+blu.perc=1

I would then like to create a pie chart that has as dimension the colors and has expression the average of each one.

Which solution would you suggest?

1 Solution

Accepted Solutions
Not applicable

Re: In Script - group percentage values

Hi Giusy,

you can load your values like this:

Table

Load Id,

          'RED' AS COLOR_NAME

          red.perc AS PERC

          ...

FROM ....

JOIN

Load Id,

          'BLUE' AS COLOR_NAME

          blue.perc AS PERC

          ...

FROM ....

then you can use the pie chart, with "COLOR_NAME" as dimension, and AVG(PERC) as expression.

2 Replies
Not applicable

Re: In Script - group percentage values

Hi Giusy,

you can load your values like this:

Table

Load Id,

          'RED' AS COLOR_NAME

          red.perc AS PERC

          ...

FROM ....

JOIN

Load Id,

          'BLUE' AS COLOR_NAME

          blue.perc AS PERC

          ...

FROM ....

then you can use the pie chart, with "COLOR_NAME" as dimension, and AVG(PERC) as expression.

MVP
MVP

Re: In Script - group percentage values

a dimensionless pie chart with five avg(...) expressions

1.png