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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple set analysis

Hi all

im trying to do a simple set analysis wich restricts the expression the past 6 months. spending a lot of googletime all i came up with is:

=count({<datLatest= {">= addmonths(Today(),-6,0)"} >} FVID)

however all i get i zero. could somone show me the correct syntax

writing

=count(if(datLatestdate_historic>addmonths(Today(),-6,0), FVID))

gets what i want, but im trying to learn the set analysis way of things

ps. using 11 SR 2

best regards

Morten

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Count({<datLatest = {">=$(=Date(AddMonths(Today(),-6)))"}>}FVID)

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Count({<datLatest = {">=$(=Date(AddMonths(Today(),-6)))"}>}FVID)

Not applicable
Author

Thank you so much for the quick respons. It does seem to work, however i seem to be getting different results when using the two expressions:

=count(if(datLatest>addmonths(Today(),-6), FVID))   =2589 (just to show there is a difference)

and

=Count({<datLatest = {">=$(=Date(AddMonths(Today(),-6)))"} >} FVID)  = 2610

Is there a difference between the two expression?

best regards

Morten

its_anandrjs
Champion III
Champion III

Yes there is small difference of equal sign in above expression not use and in second use may be rows not fetch in this condition please check.

=count(if(datLatest>addmonths(Today(),-6), FVID))   =2589 (just to show there is a difference)

and

=Count({<datLatest = {">=$(=Date(AddMonths(Today(),-6)))"} >} FVID)  = 2610


Regards

Anand

Not applicable
Author

thank you for correcting my idiotic mistake

case solved

its_anandrjs
Champion III
Champion III

You are Welcome

Regards

Anand