Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

a AND b NOT c

Hi,

Let say that I have a Transaction table that contains customer name, product name, and price.

NameProductPrice

Andy

Shoes100
BrettShirts200
RobertShoes300
RobertShirts350
RobertLaptop1000
Andy Shirt200
BrettShoes200

I want to be able to display this data in QlikView Dashboard and I want the user to make a selection visually for a person that buy shoes AND shirts but NOT laptop

which if done correctly will result in Andy and Brett.

Any guidance how to do this? Do I need to apply macro?

Thanks!

8 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Have a look at the application.

     Here user can enter the products which should be included and which should be excluded.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
sushil353
Master II
Master II

Hi,

Try this:

MaxString({<Name=e({<Product={'Laptop'}>}Name)>}Price)

PFA application.

HTH

Sushil

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find attached file for solution.

Hope this helps you.

Regards,

Jagan.

Gysbert_Wassenaar

See attached qvw

edit: In the chart Name is used as dimension and this hidden expression:

sum({<Name=p({<Product={'Shoes'}>}Name)>*

        <Name=p({<Product={'Shirts'}>}Name)>*

        <Name=e({<Product={'Laptop'}>}Name)>}1)

The expression selects only those names that have Shoes and Shirts and not Laptop.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

     Use Alternate States

     See attached qvw

Not applicable
Author

Hi Kaushik,

Unfortunately, I can't open your document.. can you explain the approach? Thanks

Not applicable
Author

Hi Gysbert,

Unfortunately I can't open the document, can you explain your approach? Thanks..

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Use this expression.

     sum({<Name = e({<Product = {"$(vNotProduct1)"}>}),Product = {"$(vProduct1)","$(vProduct2)"} >}Price)

     Where vNotProduct is a variable where user will enter which product not bought, same vProduct1 and vProduct2 are other variables where user will enter the product which is bought.

     This makes it more dynamic where user can actually drive this.    

     Hope the idea is clear.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!