Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis question

Hi,

I have the following expression.

count({1<SMI_Position01.BusinessDate = {'$(vPreviousBusinessDate)'}  >}BusinessDates_Final.PreviousBusDate)

vPreviousBusinessDate is a date which is storing a date field. I can see that the vPreviousBusinessDate has the correct value in another windows, but I am not sure if the {'$(vPreviousBusinessDate)'}  is the correct expression, I have tried different variations but I don't get a value, stays 0. Also I am looking for historic data, so I assume it's correct to have 1 and not $.

Thank you,

Panos.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

maybe you need to format the date

count({1<SMI_Position01.BusinessDate = {'$(=date($(vPreviousBusinessDate)))'}  >}BusinessDates_Final.PreviousBusDate)

add your expression in a chart (it's ok also withoud dims), remove the label and look at the date as in image; it should be as SMI_Position01.BusinessDate

1.png

View solution in original post

3 Replies
krishna_2644
Specialist III
Specialist III

Hi,

if  the variable vPreviousBusinessDate  holds another expression to be evaluated then you have to use {'$(=vPreviousBusinessDate)'}  in the set analysis.

if  vPreviousBusinessDate  is just a value then your expression seems to be legit.


Coming to the 'Value is 0' check if there are any other expressions or triggers on the sheet which changes the variable value.


Cheers

krishna

maxgro
MVP
MVP

maybe you need to format the date

count({1<SMI_Position01.BusinessDate = {'$(=date($(vPreviousBusinessDate)))'}  >}BusinessDates_Final.PreviousBusDate)

add your expression in a chart (it's ok also withoud dims), remove the label and look at the date as in image; it should be as SMI_Position01.BusinessDate

1.png

Not applicable
Author

Hi,

That works thank you! however I am now facing another issue. As i am using  count({1< that means i am selecting the whole book and i think that it ignores current selections made on the book. Is there a way to include the current selection a user makes within the set analysis calculation somehow. The data I need is always for previous business date if makes any simpler.

Thank you!

Panos.