Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have simple data as shown below:
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 |
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 20
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
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
];
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
Please find the attachment
Will this work for you?
Dear,
find the attached file.
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
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.
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.
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.
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.