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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression Problem

Hi All,

I have file like below, and I would to count number keys between  201601 and 201603 based on the Account _Open_Date using If condition.

Example.PNG

4 Replies
Anil_Babu_Samineni

What was the logic behind for 201601 and 201603 ??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hello!

Try this: count({<Account_Open_Date={"$(= '>=' & '201601' & '<=' & '201603')"}>} key)

jmvilaplanap
Specialist
Specialist

Using Set Analysis:

  • count({<Account_Open_Date={'201601','201602','201603'}>}Key)
    • Because this have not date format, then I don't know if you can use < or > symbols

Usign If is almost the same (but I'm not sure if it works)

  • count(if(Account_Open_Date = '201601' or Account_Open_Date = '201602' or Account_Open_Date = '201603', Key)
sunny_talwar

Key can repeat?

Capture.PNG

If you want distinct count

Count(DISTINCT {<Account_Open_Date = {'>=201601<=201603'}>} Key)

If you want count

Count({<Account_Open_Date = {'>=201601<=201603'}>} Key)