Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I am having a problem in creating pie chart as per my requirements

I have simple data as shown below:

NamesMarks
A2
B3
C4
D5
E6
F7
G8
H9
I10
J11
K12
L16
M17
N20
O21
P34
Q50

Now I want to create a pie chart with 3 pies on it as: 1) Marks Less than 10

                                                                            2) Marks Between 10-20

                                                                            3) Marks Greater than 20Untitled.jpg

And show their percentages as shown. I don't know if I have to create groups or what. Please explain this in detailed manner as I am new to QlikView

1 Solution

Accepted Solutions
mphekin12
Specialist
Specialist

Looks like there is a space missing between INLINE and the [.  Try this:

LOAD
  *,
 
if(Mark < 10, '< 10', if(Mark < 20, '10 to 20', '> 20')) as Bucket;
LOAD * INLINE [
  Name, Mark
  A, 2
  B, 3
  C, 4
  D, 5
  E, 6
  F, 7
  G, 8
  H, 9
  I, 10
  J, 11
  K, 12
  L, 16
  M, 17
  N, 20
  O, 21
  P, 34
  Q, 50
]
;

View solution in original post

13 Replies
nizamsha
Specialist II
Specialist II

LOAD * Inline [

Names ,Marks

A ,2

B, 3

C ,4

D, 5

E, 6

F, 7

G, ,8

H, 9

I, 10

J, 11

K, 12

L, 16

M ,17

N ,20

O, 21

P,34

Q, 50

];

NoConcatenate

LOAD Names,if(Marks<10,Dual('0-10',1),if(Marks>=10 and Marks<=20, Dual('10-20',2),

if(Marks>20,Dual('20',3)))) as Age Resident TableA;

use Age as Dimension and  marks  as Expression u will get 3 Slices like u want as i understood correctly

sudeepkm
Specialist III
Specialist III

Please find the attachment

mphekin12
Specialist
Specialist


Will this work for you?

mdmukramali
Specialist III
Specialist III

Dear,

find the attached file.

nizamsha
Specialist II
Specialist II

or else if  u want to use in front end mean use class function but class function usually give equal interval

class(marks,10) if u dont want  <= ,<, X, symbol mean ,use replace function and replace the symbol

when u use class class function some time u wont get the sort order position correctly so go to the sort tab  and sort  text A-Z

Not applicable
Author

Thanks for the reply, but after running the script when I select pie chart after right clicking, there is no Age option as dimension. All I am getting two fields Names and Marks.

Not applicable
Author

Thanks for your reply. I think i am using QlikView personal edition. Hence I am unable to open your attached file. Can you please explain the process in steps. That will be very helpful.

Not applicable
Author

Thanks for your reply. I think i am using QlikView personal edition. Hence I am unable to open your attached file. Can you please explain the process in steps. That will be very helpful.

Not applicable
Author

Thanks for your reply. I think i am using QlikView personal edition. Hence I am unable to open your attached file. Can you please explain the process in steps. That will be very helpful.