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: 
Not applicable

Comparing value in a variable

Hi All,

I'm try to calculate a count of application which have 'vtestonclock' value greater than 30 via the following formula:

count ({$<$(vtestonclock)={">$(= 30)"},[Meeting]={'Full'},

  , [Application ]={'Application -site'},[Current ]={'Approved','Further approved'}>} DISTINCT Application_ref)

It works when i'm putting in the value via dimension 'Taken_OnClock' (instead of 'vtestonclock'). But, doesn't work when i use variable 'vtestonclock'.

Can someone please help me with this (how to correctly put in the variable)?

Any help will be much appreciated.

Kind Regards,

Kshitij

16 Replies
Not applicable
Author

Hi Kushal,

No luck. when i try to use the expression as suggested by you it doesn't work. everything coming in as '-'

Regards,

Kshitij

Kushal_Chawda

Please share sample file to work on

Miguel_Angel_Baeyens

The left side of the set modifier cannot be an expression, it must be a field name.

However, you can use the advanced query syntax to get the values you are looking for, in the form of

count ({$<Taken_OnClock={"=if(len($(vtest))=0,Taken_OnClock,$(vtest))"},[Meeting]={'Full'}, [Application ]={'Application -site'},[Current ]={'Approved','Further approved'}>} DISTINCT Application_ref)

I just copied your expression but you could use anything else for that, like a different field:

Count({$< Application_ref = {"=Sum(Field) > 30"}, [Meeting] = {'Full'}, [Application ] = {'Application -site'}, [Current ] ={'Approved', 'Further approved'} >} DISTINCT Application_ref)


Will search for Application_ref where Sum(Field) greater than 30 is true. That can be changed by any other working expression.



Not applicable
Author

is it possible to share it via any other way rather than uploading it on the forum?

Kushal_Chawda

refer to below link, you can scramble your data and share it here

Preparing examples for Upload - Reduction and Data Scrambling

effinty2112
Master
Master

HI,

Maybe

count ({$<$(=vtestonclock)={">30"},[Meeting]={'Full'},

  , [Application ]={'Application -site'},[Current ]={'Approved','Further approved'}>} DISTINCT Application_ref)

mangalsk
Creator III
Creator III

can you just send a dummy file, i am wondering what is missed