Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
JordyWegman
Partner - Master
Partner - Master

Not available in current selection, but are in total selections

Hi,

I have the following situation. We have an article that is available in a DC, say in BB. This article can have two statusses, A or B, say available or not available. This DC delivers to a certain country and multiple DCs can deliver to the same country. Besides that, articles can be listed to a certain country. For example, some products are sold in DE but not in NL.

What we want to make is a result that tells us: If you have an article that is not available in DC BC. We want to know in which DCs this article is available. The result should be a concatenated string of those DCs.

     

ArticleArt.StatusDCCountryLocation - CountryListedResult
1ABBDEBB-DEY
1ABCNLBC-NLN
1BBCFRBC-FRYBB-BD-BA
1BBCBEBC-BEYBB-BD-BA
1ABDBEBD-BEY
1ABAFRBA-FRY

This is what we have tried and many derivatives:

IF( Art.Status = B,

   Aggr({$< Art.Status = {'B'}>}

   concat( TOTAL {$< Art.Status = {'A'},[DC]= >}[DC],'-')

   ,Location-Country, Article, Listed)

,null()

)

Can someone push this in the right direction?

Kind Regards,

- Jordy

Work smarter, not harder
1 Solution

Accepted Solutions
JordyWegman
Partner - Master
Partner - Master
Author

It wasn't possible, or really complex maybe, so instead of doing this is the front-end I made it in the datamodel. Thanks for the help!

Work smarter, not harder

View solution in original post

2 Replies
Or
MVP
MVP

Your code looks like it's pretty much correct (once I corrected the syntax and field names).

Why does the expected result not include BC NL (line 2) in the result? It has Article 1 listed, and it has status = A. This means it covers all of the requirements in your formula. Should there be another set modifier to exclude Listed = 'N'?

JordyWegman
Partner - Master
Partner - Master
Author

It wasn't possible, or really complex maybe, so instead of doing this is the front-end I made it in the datamodel. Thanks for the help!

Work smarter, not harder