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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
alexis
Partner - Specialist
Partner - Specialist

Set Analysis function syntax - Help needed

Hi

I am creating a KPI that counts the number of staff as in:

= count(distinct(StaffName))

however I want to restrict the count to those members of Staff who started work (StartDate) on a date greater than or equal to a date held in memory, as in:

StartDate >= $(vFYStart)

The "StartDate" is stored as a date (dd/mm/yy) and the variable is stored as a number 63647 (the numeric representation for 1/7/2018).

My Set Analysis should be something like:

=Count({$<num([StartDate]) >= {$(vFYStart)}>}StaffName))

or something like that. I have tried all the possibilities that I could think of and nothing works. Any ideas?

Regards

Alexis

 

Labels (2)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Your have to format the variable data instead. Try like:

vFYStart = Date(<your already existing expression>, 'DD/MM/YY')

and the expression like: 

=Count({$<[StartDate]= {">=$(vFYStart)"}>}StaffName)

 

View solution in original post

2 Replies
tresB
Champion III
Champion III

Your have to format the variable data instead. Try like:

vFYStart = Date(<your already existing expression>, 'DD/MM/YY')

and the expression like: 

=Count({$<[StartDate]= {">=$(vFYStart)"}>}StaffName)

 

alexis
Partner - Specialist
Partner - Specialist
Author

The ">=......." was very helpful and that was where we were going wrong.

Much obliged 

Alexis