Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expresion not Include (an easy one)

Hi everybody!

I have a problem with my expression

I want to count some products when the type is PEND but not when the type is FACT.

 

ProductType
1FACT
2FACT
3PEND
1PEND
4

PEND

In this example The result must be 2, becahuse of products 3 and 4. The thing is that product 1 should not be count because it is FACT too.

I feel it is simple but I can do it myself,

Thanks in advance!

15 Replies
sunny_talwar

May be this:

Count(DISTINCT {<Product = e({<Type = {'Fact'}>})>}Product)

swuehl
MVP
MVP

Or when you need to filter on Type = PEND and there are more than these two types shown:

Count(DISTINCT {<Product = e({<Type = {'FACT'}>}), Type = {'PEND'}>} Product)

Not applicable
Author

The solution you gave me is very helpfull in the example I submit.

The problem is that I have one more condition that is not working.

 

ProductTypeVa
1FACT0
2FACT1
3PEND1
1PEND1
4PEND1
5PEND0
5FACT1

I am trying to filter only values where Va = 1 and then to count the PRODUCTS for PEND but not for FACT, only PEND.
In this case the solution is 3 (because the products 3,1 and 4)

I really do not know to work with the expression. Please Help me!

sunny_talwar

Try this:

Count(DISTINCT {<Product = e({<Type = {'Fact'}>}), Va = {1}>}Product)

=Count(DISTINCT {<Product = e({<Type = {'Fact'}, Va = {1}>}), Va = {1}>}Product)


Capture.PNG

Not applicable
Author

Hi Sunny !

Thanks a lot for your help. You are been verry helpfull.

I understand what you do, and it works for me in the example I gave you. But it is not working on my aplication.

Can you please see it? It is making me go crazy.

The example is the same , but the fiels have differents names. SKU is a Product and se_Cumple is Va.
Now i am working with NODO =91, and I know that we have 292 SKU for PEND and 414 SKU for FACT.

Only 5 SKU and ind PEND but not in FACT, this are: 552495, 572637, 572639, 575806, 583366

The  graph I am working is showing nothing now. I clear the board so it will be very easy for you to see how it is working.

!

I really need you help, please!

sunny_talwar

I don't see a graph in your application? Can you guide me where to locate it?

Not applicable
Author

sure !!!
Please  let me know if you can see ir.  the problem is that with my expression there is nothing to show !

Not applicable
Author

I am not sure if you receive my answer because I see a message "Actually modarated" or something like that beacuse i see it in spanish.

I try this way too:


for the master.jpg

the problem is that with my expression there is nothing to show !

Let me know if you see the picture and the graph .

Thanks a lot!!!

sunny_talwar

This?

Capture.PNG