Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ziabobaz
Creator III
Creator III

how to use P() E() functions with AND logic

Hi!

I have Created, Sent, Cancelled statuses for each Order

I want to Count those orders, which were Created AND Cancelled, but never Sent

My formula:

Count(distinct {<Order = P ( {< Status ={'Created'} >}) + P ( {< Status ={'Cancelled'} ) - P ( {< Status ={'Sent'} >})  >} OrderN)

 

It does not work as intended. It seems that between first two P() works as OR, not AND

Please, help.

 

Labels (1)
1 Solution

Accepted Solutions
agigliotti
Partner - Champion
Partner - Champion

Hi @ziabobaz ,

Maybe this:

=Count(distinct {<Order = P ( {< Status ={'Created'} >}) * P ( {< Status ={'Cancelled'} ) - P ( {< Status ={'Sent'} >}) >} OrderN)

I hope it can helps.

Best Regards

View solution in original post

2 Replies
agigliotti
Partner - Champion
Partner - Champion

Hi @ziabobaz ,

Maybe this:

=Count(distinct {<Order = P ( {< Status ={'Created'} >}) * P ( {< Status ={'Cancelled'} ) - P ( {< Status ={'Sent'} >}) >} OrderN)

I hope it can helps.

Best Regards

ziabobaz
Creator III
Creator III
Author

Yes, it works, many thanks!