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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Fitus9092
Contributor III
Contributor III

Set analysis with formula and condition

Hello i'm trying to use this formula in set analysis but it not work.

Count( {< esclusione = {'0'} , esclusione2 = {'1'}, Diff ={"=<90"}>} progressivoSDO_IMA_STEMI_PTCA)

Diff is a variable system with this formula :

num#(interval((dataInterventoPrincipale&' '&oraInterventoPrincipale - [dataora triage]),'mm'))

I tried this second formula in set analysis but doesen't work
Count( {< esclusione = {'0'} , esclusione2 = {'1'}, {="num#(interval((dataInterventoPrincipale&' '&oraInterventoPrincipale - [dataora triage]),'mm'))"} = {"<=90"} >} progressivoSDO_IMA_STEMI_PTCA).

 

Thanks

Labels (1)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Set modifier should be defined for fields will not work on expressions.  I usually think of the modifiers as invisible selections made to the datamodel before calculating the expression.

Are you able to pre generate the num as a field in the script?

num#(interval((dataInterventoPrincipale&' '&oraInterventoPrincipale - [dataora triage]),'mm')) as [Diff]

If you are then the set can look like this in your application.

Count( {< esclusione = {'0'} , esclusione2 = {'1'}, Diff ={"=<90"}>} progressivoSDO_IMA_STEMI_PTCA)

View solution in original post

3 Replies
Vegar
MVP
MVP

Set modifier should be defined for fields will not work on expressions.  I usually think of the modifiers as invisible selections made to the datamodel before calculating the expression.

Are you able to pre generate the num as a field in the script?

num#(interval((dataInterventoPrincipale&' '&oraInterventoPrincipale - [dataora triage]),'mm')) as [Diff]

If you are then the set can look like this in your application.

Count( {< esclusione = {'0'} , esclusione2 = {'1'}, Diff ={"=<90"}>} progressivoSDO_IMA_STEMI_PTCA)

Fitus9092
Contributor III
Contributor III
Author

It works, many thanks!

Vegar
MVP
MVP

Glad to help. Thank you for the fast feedback.