Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. April 17 - 20, 2023, in Las Vegas! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
nesonica
Contributor III
Contributor III

Expression for filtered results

Hi guys,

 

I am trying to build table that should get the following results: 

CURRENTEXPECTED 
MatchcodesMatchcodesSales
A123A1231000
B123B1232000
A234  
A345  
A456A4565000
B234B2346000

 

Matchcodes to filter are: 'A123', 'B123', 'A456', 'B234'

 

Unfortunately the expression I wrote is not working:

Sum({<PeriodeMath={'>=$(vMinPeriodeJahr2)<=$(vMaxPeriode2)'},Matchcode={'A123', 'B123', 'A456', 'B234'}>}Sales)

Can you help me out with that one? Thanks so much!

Nes from Austria

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

Why don't you create an Island Table with all the MatchCodes you need like this

LOAD * INLINE [
MCNeeded
A123
B123
A456
B234
...
];

and then try this as your expression

Sum({<PeriodeMath = {'>=$(vMinPeriodeJahr2)<=$(vMaxPeriode2)'}, Matchcode = p(MCNeeded)>} Sales)

View solution in original post

6 Replies
sunny_talwar

So, it is showing all MatchCodes, but Sales is showing up as 0? Or do you see Sales showing up for A234 and A345?

nesonica
Contributor III
Contributor III
Author

I would like to only show the Sales that are filtered. A234 and A345 shall
disappear.
sunny_talwar

I get that... but are you saying that even after adding set analysis (Matchcode={'A123', 'B123', 'A456', 'B234'}) to show these match codes... you see A234 and A345 with Sales value?

nesonica
Contributor III
Contributor III
Author

Yes exactly. I do not have that issue with other formulas. Maybe it is because of the number of filters set? Because there are actually over 900 matchcodes that I added to the filter. 😄 

sunny_talwar

Why don't you create an Island Table with all the MatchCodes you need like this

LOAD * INLINE [
MCNeeded
A123
B123
A456
B234
...
];

and then try this as your expression

Sum({<PeriodeMath = {'>=$(vMinPeriodeJahr2)<=$(vMaxPeriode2)'}, Matchcode = p(MCNeeded)>} Sales)
nesonica
Contributor III
Contributor III
Author

Thank you, you are absolutely right!