# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for
Did you mean:
Specialist

## Pie chart dimensions

In a pie chart I need to separate the average monthly sales as follows:

> 1000

> 500 and <= 1000

> 0 and <= 500

As shown in the image in the attachment qvw

Regards.

7 Replies
Partner

you can use a calculated dimension.

=if((Cant >0 and Cant <= 500),'0-500',

if((Cant > 500 and Cant <=1000),'501-1000','>1000'))

Class() may work as well.

With the data you provided, the pie would not calculate because of negative numbers.

I used a set expression to overcome that issue.

sum( { \$<Cant= {">0"}  >} Cant )

serviambi.com

Creator

I put something together quickly that uses a calculated dimension to generate the thresholds used in the pie chart.  Please see the attached document.

Creator III

Dear Sandro,

Please check and let me know .

Thanks

Specialist
Author

Hi.

Your answer works perfect, but I need to separate the monthly average.

Example:

If(Sum(Cant)/3<=500,'0-500',If(Sum(Cant)/3<=1000,'500-1000',If(Sum(Cant)/3>=1000,'>1000')))

and this fails.

Regards.

Creator III

Sorry ,

Please check the attachment of qvw.

Specialist
Author

Hi shaik