Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

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
MVP
MVP

Re: Simple set analysis

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

5 Replies
MVP
MVP

Re: Simple set analysis

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

Not applicable

Re: Simple set analysis

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

Re: Simple set analysis

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

Re: Simple set analysis

thank you for correcting my idiotic mistake

case solved

Re: Simple set analysis

You are Welcome

Regards

Anand

Community Browser