Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Set Analysis with 2 Functions

Hello!

I have the following expressions with set analysis:

To count the number of observations:

COUNT ({$<ID_TIME_DATE#={">=$(='$(vDateFrom)')<=$(='$(vDateTo)')"},OBSERVATIONS={">0"}>} OBSERVATIONS)

To count the number of anomalies:

COUNT ({$<ID_TIME_DATE#={">=$(='$(vDateFrom)')<=$(='$(vDateTo)')"}>} DISTINCT ANOMALY_ID)

Now I need to count the number of observations with anomalies, using both expressions.

Do you know how could I do that?

Thank you!!!

1 Reply
anbu1984
Master III
Master III

Try this

COUNT ({$<ANOMALY_ID=P({$<ID_TIME_DATE#={">=$(='$(vDateFrom)')<=$(='$(vDateTo)')"}>} ANOMALY_ID),ID_TIME_DATE#={">=$(='$(vDateFrom)')<=$(='$(vDateTo)')"},OBSERVATIONS={">0"}>} OBSERVATIONS)