Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Categorizing pivot table

Hi,

I have the following excel data in this format:

   

BooksPrice
A15
B9
C12
D11
E8

I am able to create a table in qlikview. However, I would like to know if I would be able to further categorize them into 'Expensive'>10, 'Cheap'<10 in Qlikview directly? eventually, I hope to create a pivot table which looks smth like this:

eventually, I hope that in my final pivot table, in order to find how cheap book A is, I would like to click the category 'cheap', followed by 'book A', to find the price of book A.

   

Row LabelsABCDE
Cheap91322
Expensive15128

35

7 Replies
varshavig12
Specialist
Specialist

Create buckets

varshavig12
Specialist
Specialist

Dimension:

=if(Price>=10,'Expensive','Cheap')

=Books

Expression:

Price

varshavig12
Specialist
Specialist

qlikview979
Specialist
Specialist

Hi Try This,

T1:

load * Inline [

Books, Price

A, 15

B, 9

C, 12

D, 11

E, 8

];

NoConcatenate

T2:

load

Books,

Price,

if(Price>10,'Expensive','Cheap') as Final

Resident T1;

drop table T1;

Not applicable
Author

HI, thanks for replying, there seems to be an error.

i am supposed to type the above code in the script editor as follows right?

Load books,

Dimension:

=if(Price>=10,'Expensive','Cheap')

=Books

Expression:

Price

I will get an error.

Not applicable
Author

hi, thanks for replying. but i will get an unknown statement error.

Also, i will be dealing with big data, so i would not be able to key in t1. how should the code in this case then?

Not applicable
Author

it is something like this table though, just that books should be the second column, and the first column would be the if statement.