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: 
evansabres
Specialist
Specialist

OR in Expression

I have an expression that is structured as such:

=SUM({$<promoCDE={"MP1"}>}[Net Sold Qty])

However, I have several 'promoCDE' types that begin with MP that are the same as MP1 (MP1, MP1BOX, MP3, MP3BOX, MP6)

I want to build in the expression to pull all of these. How do I structure that using an OR statement???

1 Solution

Accepted Solutions
sunny_talwar

Try with wildcard search:

=Sum({$<promoCDE={'MP*'}>}[Net Sold Qty])

View solution in original post

4 Replies
sunny_talwar

Try with wildcard search:

=Sum({$<promoCDE={'MP*'}>}[Net Sold Qty])

evansabres
Specialist
Specialist
Author

That works perfectly, thank you for your help

evansabres
Specialist
Specialist
Author

That worked perfectly. Say however that I wanted to include several 'promoCDE' within this expression For example, if I wanted to include the promoCDE's of '2FAMPK' 'GR' 'YTHHOC'

How would I structure this using an OR statement??

sunny_talwar

Then you can do this:

=Sum({$<promoCDE = {'2FAMPK', 'GR', 'YTHHOC'}>}[Net Sold Qty])