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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
stvegerton
Creator III
Creator III

Show rows that have this AND this but NOT this

I want to show Customers that have both Capital AND Aftermarket Usage Qty but NO Service Usage Qty… Maybe with a button? Any advice? Please see the attached.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Yes Marco,

The given sample file is not giving any single Customer due to not fulfilling the requirements.

View solution in original post

11 Replies
pamaxeed
Partner - Creator III
Partner - Creator III

See my attached sample...

Is that what are you looking for?

Regards,

Patric

MarcoWedel

Hi,

maybe like

=Sum({$<[Ship To - Customer #]=P({1<Usage={'Capital'}>}[Ship To - Customer #])*P({1<Usage={'Aftermarket'}>}[Ship To - Customer #])-P({1<Usage={'Service'}>}[Ship To - Customer #])>} Quantity)

hope this helps

regards

Marco

MK_QSL
MVP
MVP

Create a Button

Name whatever you want to give

Go to Action Tab

Add -- Select in Field

Field

[Ship To - Customer Name]

Search String

=Concat({<[Ship To - Customer Name] = P({<Usage = {'Aftermarket'}>})  * P({<Usage = {'Capital'}>}) * E({<Usage = {'Service'}>})  >}DISTINCT [Ship To - Customer Name],', ')

Hope this will help!

MarcoWedel

Hi Manish,

nice one.

Just tried to change your expression to get something like

("GENESEE WATER TREATMENT PLANT"|"IDAHO SPRINGS WTP")

as search string and ended up with

='("'&Concat({<[Ship To - Customer Name] = P({<Usage = {'Aftermarket'}>})  * P({<Usage = {'Capital'}>})>}DISTINCT [Ship To - Customer Name],'"|"')&'")'

(leaving out the 'Service' exclusion because the sample data seems to have no matches for the complete condition)

maybe this helps too

regards

Marco

MK_QSL
MVP
MVP

Yes Marco,

The given sample file is not giving any single Customer due to not fulfilling the requirements.

stvegerton
Creator III
Creator III
Author

Thank you all so much for the suggestions. I took the weekend off but will give them a try and let you know how it played out!

stvegerton
Creator III
Creator III
Author


I took what I learned from Manish & Marco and changed the use case ; Show me customers with Capital & Service with NO Aftermarket and it worked! Trying to paste the expression in to share. What is the trick to paste expressions in this forum?

MK_QSL
MVP
MVP

Simple Ctrl + v 

stvegerton
Creator III
Creator III
Author

That's what I've been trying but it doesn't work. Must be my browser..