Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

tabla.png

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)

PIE CHART.png

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
jaumecf23
Creator III
Creator III

This is the code that i have use :

Intervals:

LOAD * Inline [

from, to, %

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

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

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

];

Temporal:

LOAD * INLINE [

    cd_meter, Lecturas

    1, 96

    2, 96

    3, 20

    4, 70

    5, 50

    6, 10

    7, 20

    8, 52

];

IntervalMatch(Lecturas)

left Join(Temporal)

LOAD Distinct from, to

RESIDENT Intervals;

Left join (Temporal)

LOAD * resident Intervals;

DROP Fields from, to;

DROP Tables Intervals;

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

View solution in original post

3 Replies
jaumecf23
Creator III
Creator III

I attach a QVW than can provides a solution

Anonymous
Not applicable
Author

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?

jaumecf23
Creator III
Creator III

This is the code that i have use :

Intervals:

LOAD * Inline [

from, to, %

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

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

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

];

Temporal:

LOAD * INLINE [

    cd_meter, Lecturas

    1, 96

    2, 96

    3, 20

    4, 70

    5, 50

    6, 10

    7, 20

    8, 52

];

IntervalMatch(Lecturas)

left Join(Temporal)

LOAD Distinct from, to

RESIDENT Intervals;

Left join (Temporal)

LOAD * resident Intervals;

DROP Fields from, to;

DROP Tables Intervals;

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