Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Error in Expression

Hi there,

I want to show all contracts (agreements) that were Terminated in the month of June.

My formula:

 

if

([Date Sold]>='01/06/2013' or <='30/06/2013',count(DISTINCT [Agreement Number]))

It shows an Error in Expression message at the top of the expression box.

The problem is at the smaller or equal to 30/06/2013, because it underlines that symbols in red.

Can anyone help me with an alternative way of expressing my formula.

Thanks

*R*

5 Replies
Not applicable

Re: Error in Expression

Try

if([Date Sold]>='01/06/2013' or [Date Sold] <='30/06/2013',count(DISTINCT [Agreement Number]))

jerem1234
Valued Contributor II

Re: Error in Expression

try:

if

([Date Sold]>='01/06/2013' or [Date Sold]<='30/06/2013',count(DISTINCT [Agreement Number]))

Not applicable

Re: Error in Expression

try

([Date Sold]>='01/06/2013' AND [Date Sold]<='30/06/2013',count(DISTINCT [Agreement Number]))

techvarun
Valued Contributor II

Re: Error in Expression

if ([Date Sold] >='01/06/2013' or [Date Sold] <='30/06/2013',count(DISTINCT [Agreement Number]))

Please try this

Not applicable

Re: Error in Expression

firstly in script write your date field according to this format--

date(date#([Date Sold],'DD/MM/YYYY'),'DD/MM/YYYY') AS [Date Sold]

THE TRY THIS

count(distinct if([Date Sold]>='01/06/2013' and [Date Sold] <='30/06/2013', [Agreement Number]))

Community Browser