Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Re: a AND b NOT c

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

sushil353
Honored Contributor II

Re: a AND b NOT c

Hi,

Try this:

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

PFA application.

HTH

Sushil

MVP
MVP

Re: a AND b NOT c

Hi,

Please find attached file for solution.

Hope this helps you.

Regards,

Jagan.

Re: a AND b NOT c

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

Re: a AND b NOT c

Hi,

     Use Alternate States

     See attached qvw

Not applicable

Re: a AND b NOT c

Hi Kaushik,

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

Not applicable

Re: a AND b NOT c

Hi Gysbert,

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

Re: a AND b NOT c

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

Community Browser