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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Mahamed_Qlik
Specialist
Specialist

General Query

Hello Guys,

I need one field named as "Products" listed below:

Products
Small
Large
Total

And if Click on Small the it should show Small Products (A,B) only.

And if Click on Large then it should show Large Products (C,D,E)only,

And if Click on Total then it should show all the Products (A,B,C,D,E,F).

I have following field on all the product named as Link_Product

Link_Product
A
B
C
D
E
F
G

Small Products are : A, B

Large Products are: C,D,E

Total Total Products are: A,B,C,D,E,F (Excluding G)

Kindly suggest.

12 Replies
Mahamed_Qlik
Specialist
Specialist
Author

I need to create the Products field in script (Back End)

jonathandienst
Partner - Champion III
Partner - Champion III

Load the products in a way that associates the product types with the products:

LOAD *

Inline

[

  Product, Type

  A, Small

  B, Small

  C, Large

  D, Large

  E, Large

];

Total is the same as nothing selected, so you dont really need that. But if you insist on doing that, add

A, Total

B, Total

...

to the load above.

(The inline load is for example purposes - change the inline load to whatever source you are loading from)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
senpradip007
Specialist III
Specialist III

Can you share sample qvw ?

MayilVahanan

Hi

Try like this

Test:

LOAD *,  if(Match(Link_Product, 'A', 'B'), 'Small', if(Match(Link_Product, 'C', 'D', 'E'), 'Large')) AS Product Inline

[

Link_Product

A

B

C

D

E

F

G

];

Load Link_Product, if(not Match(Link_Product, 'G'), 'Total') AS Product Resident Test;

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
qlikmsg4u
Specialist
Specialist

Please find the attached app and script

Product:

Load*,If(Match(Link_Product,'A','B'),'Small',If(Match(Link_Product,'C','D','E'),'Large')) as Size;

Load * Inline [

Link_Product

A

B

C

D

E

F

G];

Load Link_Product, if(not Match(Link_Product, 'G'), 'Total') AS Size Resident Product;

qlikviewwizard
Master II
Master II

Hi Mahamed Khan, Mayil Vahanan Ramasamy's solution is working for me.

Mahamed_Qlik
Specialist
Specialist
Author

I have one field named as Link_Products which contains 7 values (A,B,C,D,E,F,G) and further i want to categories it

in Small (A, B) Large (C,D,E) and Total (A,B,C,D,E,F) and this three categories should be in single field named as Products.

Thank you for your response.

qlikviewwizard
Master II
Master II

Hi Use the below script: Here use Product for your requirement. Hope this will help you. Thank you.

Test:

LOAD *,  if(Match(Link_Product, 'A', 'B'), 'Small', if(Match(Link_Product, 'C', 'D', 'E'), 'Large',if(Match(Link_Product, 'A', 'B''C', 'D', 'E'), 'Large'))) AS Product Inline

[

Link_Product

A

B

C

D

E

F

G

];

Load Link_Product,

if(not Match(Link_Product, 'G'), 'Total') AS Product

Resident Test;

qlikviewwizard
Master II
Master II

Hi Mahamedfaijan

Did you get the solution?