Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

input box

A table contains products and sales

My script looks like in text object,

Sum({<product={'$(Vproduct)'}>}sales)

It works fine if I enter single product in inputbox.

But now the requirement is

If I enter multiple products in input box then it should display total sales of the respective products.

How to achieve this??

Please suggest!!!

Thanks in advance!

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

HI,

You can try this.

Sum({<Product = p(Product) >}Sales)

This way you can get the sales of all product without selection and when you make selection it will give for those products.

For multiple values in variable you can try below.

Make sure that values are separated by Comma in variable.

Sum({<Product= {"$(=Replace(vTest,',','","'))"}>}Sales)

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

HI,

You can try this.

Sum({<Product = p(Product) >}Sales)

This way you can get the sales of all product without selection and when you make selection it will give for those products.

For multiple values in variable you can try below.

Make sure that values are separated by Comma in variable.

Sum({<Product= {"$(=Replace(vTest,',','","'))"}>}Sales)

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

Highlighted
Specialist
Specialist

Hi

Please use =Sum({<Fmonth={'$(=replace(Vproduct,',',chr(39)&','&chr(39)))'}>}sales) when you're entering multiple items( i hope separated by commas).

Regards

Pratyush