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

Compare two variable in Set Analysis as left and right operands

Hi Community,

I need Assistance to figure out the following scenario :

How to Compare two  variable in Set Analysis as left and right operands

=count(

{<

'$(Max_CreationDate_PIDE2)' = {'>$(Max_Creation_PIDE1)'}

>}ItemCode)

I Try it at my end, but it is not working.

Please help me out in the following scenario .

3 Replies
Not applicable
Author

Try like:

Count(if( Max_CreationDate_PIDE2=Max_Creation_PIDE1,1,0))

Regards

R

Not applicable
Author

Its not working out dude.

Its returning me result as count(ItemCode) no filtering at all.

let me discribe little bit more.

=count(

{<

Items.Max_CreationDate_ProcedureIDE2 = {'>$(Max_Creation_PIDE1)'}

>}ItemCode)

in the above script you can find the filed viz Items.Max_CreationDate_ProcedureIDE2 which contain more the one value.

I drop Items.Max_CreationDate_ProcedureIDE2 as a list box and select one of the values listed. After that I find its working as required by Client.

In order to avoid the select I created a variable as follows:

let Max_CreationDate_PIDE2=Max(Items.Max_CreationDate_ProcedureIDE2) which surely holds one max value.

After that I change the above count script as follows:

=count(

{<

'$(Max_CreationDate_PIDE2)' = {'>$(Max_Creation_PIDE1)'}

>}ItemCode)

Which is not working out because of two variables in set analysis.

IAMDV
Luminary Alumni
Luminary Alumni

Hi,

It will be good if you can post the sample application. Please scramble the data if it's sensitive.

Meanwhile, have you tried to use intersection of two sets? Something like this but I guessing here...

=count(

{<

Items.Max_CreationDate_ProcedureIDE2 =
{'$(Max_CreationDate_PIDE2)'} * {'>$(Max_Creation_PIDE1)'}

>}ItemCode)

Cheers,

DV

www.QlikShare.com