Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rsdhavle
Creator II
Creator II

Sections in pie chart

I have no. of clients and their revenue percentages i want to categorize clients who has revenue between A to B values, B to C values and show it into pie chart. What is the was. What would be dimension in this case?

7 Replies
its_anandrjs

You can use calculated dimension or you can make the bucket for this.

rsdhavle
Creator II
Creator II
Author

Can you give a sample expression?

Not applicable

Create intervalmatch table.

The intervalls are your dimension and the count of customers is your expression

Not applicable

type this in calculated dimension or in your script (better solution) and you will have your categories :

if(revenue>2k,'litlle client',if(revenue>50k,'middle client',if(revenue>100k,'big client')))

its_anandrjs

Sorry i update new table now check

Look at simple example you have a table where there is client name, Revenue %

Tab1:

LOAD * Inline

[

Client,Revenue%

A,20

B,30

C,10

D,50

E,50

F,40

G,20

H,70

I,55

];

Data:

LOAD *,

if(Revenue% >=10 and  Revenue% <=30, 'Between 10-30',

if(Revenue% >=30 and  Revenue% <=60, 'Between 30-60',

if(Revenue% >=60 and  Revenue% <=90, 'Between 60-90',))) as Category

Resident Tab1;

DROP Table Tab1;

And in front end take straight table

Dimension1:- Client

Dimension2:- Category

Expression:- Sum(Revenue%)

and if in chart you want direct use of calculated dimension then use same expression

if(Revenue% >=10 and  Revenue% <=30, 'Between 10-30',

if(Revenue% >=30 and  Revenue% <=60, 'Between 30-60',

if(Revenue% >=60 and  Revenue% <=90, 'Between 60-90',)))

Regards

MK_QSL
MVP
MVP

Please check enclosed file...

its_anandrjs

For pie chart take dimension

Dimension:- Category or you can use calculated dimension like

Or

if(Revenue% >=10 and  Revenue% <=30, 'Between 10-30',

if(Revenue% >=30 and  Revenue% <=60, 'Between 30-60',

if(Revenue% >=60 and  Revenue% <=90, 'Between 60-90',)))

Expression:-sum(Revenue%)

See the snap shot

Categorypie.png