Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Okay here I go. I have many items with many different prices. I want to first group those items priced into increments of 50 Cents. For example
Item Price
A .75
B .95
C 1.25
D 1.49
I want QlikView to give me this, i set the paraments that Price Group A is anything price between 50 cents and $1, and Price Group B is anything priced between $1.01 and $1.50
Item Price Price Group
A .75 A
B .95 A
C 1.25 B
D 1.49 B
Many Thanks
Hi James,
It can be achieved in three ways.
1st Way:
TABLE1:
LOAD Item,
Price,
if((Price>=.5 and Price<=1.0),'A-Class',if(Price>=1.01 and Price <=1.50,'B-Class',if(Price>1.50,'Others'))) as Class
INLINE
[
Item,Price
A,.75
B,.95
C,1.25
D,1.49
];
2nd Way:
TABLE2:
LOAD * INLINE
[
Item1,Price1
A,.75
B,.95
C,1.25
D,1.49
];
TABLE3:
LOAD * INLINE
[
Class1,Low,High
A-Class,0.5,1.0
B-Class,1.01,1.5
];
IntervalMatch (Price1) Load Low,High resident TABLE3;
3rd Way
Just load the data either from excel or using inline load. Create a Straight Table with dimensions as Item and Price
In the expressions just use this "=class(Price,0.5,'Price')" and check 'No Totals' in the same Expressions Tab.
Regards,
Srikar
I want QlikView to give me this
In script or in view (Chart) ?
A script
Hi James,
Just check the attached Qlikview file.
Regards,
Sri
THANKS, any way you can just post the script, I am using the personal edition version and am unable to open the one you sent.
Again, THANKS
Hi James,
It can be achieved in three ways.
1st Way:
TABLE1:
LOAD Item,
Price,
if((Price>=.5 and Price<=1.0),'A-Class',if(Price>=1.01 and Price <=1.50,'B-Class',if(Price>1.50,'Others'))) as Class
INLINE
[
Item,Price
A,.75
B,.95
C,1.25
D,1.49
];
2nd Way:
TABLE2:
LOAD * INLINE
[
Item1,Price1
A,.75
B,.95
C,1.25
D,1.49
];
TABLE3:
LOAD * INLINE
[
Class1,Low,High
A-Class,0.5,1.0
B-Class,1.01,1.5
];
IntervalMatch (Price1) Load Low,High resident TABLE3;
3rd Way
Just load the data either from excel or using inline load. Create a Straight Table with dimensions as Item and Price
In the expressions just use this "=class(Price,0.5,'Price')" and check 'No Totals' in the same Expressions Tab.
Regards,
Srikar
THANKS