# New to QlikView

Discussion board where members can get started with QlikView.

New Contributor II

## Need help with a pie chart

Hello community,

Im kinda new to qlikview only been using it for about 2-3 weeks

and now im in trouble with a pie chart,

I got this table to show what im trying to graphs

theeres a meter_id "cd_meter" and the total amount of reading done "total_lecturas"

the reading are supposed to be each 15 mim so theres 96 reading in a day, but something for errors they dont ocurred

so i'm trying to graphs in a pie chart how many meters got arround 75-100% of the readings, 50-75%, and less than 50%

in diffrent colours, like this (ignore paint)

how I alredy do the count(readings) in the script and save it like total_lecturas in the expresion of the pie chart

I have =total_lecturas, and im using the color mixed wizard to give the color for each porcent

something like this, ignore the colors, if(total_lecturas>72, rgb(123,123,4123), if(total_lecturas<=72 and total_lecturas>48,rgb(2312,412, etc etc)

1 Solution

Accepted Solutions
Contributor III

## Re: Need help with a pie chart

This is the code that i have use :

Intervals:

from, to, %

"0", "48", "< 50%"

"49", "72", "50-75%"

"73", "96", ">75%"

];

Temporal:

cd_meter, Lecturas

1, 96

2, 96

3, 20

4, 70

5, 50

6, 10

7, 20

8, 52

];

IntervalMatch(Lecturas)

left Join(Temporal)

RESIDENT Intervals;

Left join (Temporal)

DROP Fields from, to;

DROP Tables Intervals;

Then I have created the objtect using the Dimension "%" and the Expression "count(cd_meter)"

3 Replies
Contributor III

## Re: Need help with a pie chart

I attach a QVW than can provides a solution

New Contributor II

## Re: Need help with a pie chart

Thanks for your quick response Jaume, but I have personal edition and alredy reach the max amount for open documment, can you please attach images?

Contributor III

## Re: Need help with a pie chart

This is the code that i have use :

Intervals:

from, to, %

"0", "48", "< 50%"

"49", "72", "50-75%"

"73", "96", ">75%"

];

Temporal:

cd_meter, Lecturas

1, 96

2, 96

3, 20

4, 70

5, 50

6, 10

7, 20

8, 52

];

IntervalMatch(Lecturas)

left Join(Temporal)