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

Absolute Dates in Set Analysis

Hi

I'm trying to do a count of customers based on a particular date:

 

= count({<

     Period_Date={"$(='31/01/2011')"}

     >} CUSTOMER_ID)

The set analysis above doesn't work - I just get 0, could anyone give me some pointers please?  Any help would be much appreciated

1 Solution

Accepted Solutions
Not applicable
Author

I only changed that and go it to work, see attached

View solution in original post

13 Replies
MK_QSL
MVP
MVP

COUNT({<Period_Date = {'31/01/2011'}>}CUSTOMER_ID)

or

COUNT({<Period_Date = {'31/01/2011'}>}DISTINCT CUSTOMER_ID)

alexandros17
Partner - Champion III
Partner - Champion III

try


count({<Period_Date={'31/01/2011'}>} CUSTOMER_ID)


pay attention to date format that is period_date format must br DD/MM/YYYY

Not applicable
Author

Hi Manish and Alessandro

Thank you both for your suggestions, but that isn't working either for some reason (still getting 0 and I know  I should be getting approx 140k...)  - and I have checked that I'm using the correct date format. 

Not applicable
Author

could you send a sample doc

Not applicable
Author

Hi Siobhan,

Is there potentially some other selections that are affecting you result? Try

count({1< Period_Date={'31/01/2011'}>} CUSTOMER_ID)

This will ignore all selections and just select that period date only

hope that helps

Joe

alexandros17
Partner - Champion III
Partner - Champion III

I am sure the syntax is correct so try without set analysis

count(CUSTOMER_ID)


if it works (as I suppose try with


count({$ <Period_Date={'>01/01/2011'}>} CUSTOMER_ID)


or


count({$ <Period_Date={'>2011/01/01'}>} CUSTOMER_ID)


let me know

Not applicable
Author


Hi Carly

I couldn't send the original app as it has some sensitive stuff in it, but here's a mock up - thanks for your help.  Unfortunately I only have the free version of QV available to me at the moment so I can't open other people's files...

Not applicable
Author

It was how you spelt customer id, it looked right as the spelling was correct but the capitals cause it to error although it doesn't tell you, try this:

count({<Period_Date ={'31/01/2011'}>} Customer_ID)

Not applicable
Author

Hi Carly - it's not that, the spelling in the main app is CUSTOMER_ID, I just didn't write copy it properly in the mock up (sorry for the confusion)