Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Expressionless Expressions

I am trying to extract data from a table and count the result.  I am using a Chart/Pivot Table to do this.  The expression runs:

 

This is giving me a blank table when I am expecting results (I am querying the data using another method so that I can check whether the result is what I expect).

If I just put in the expression for the start date I get a result but not the end date.  What have I missed? There are dates in the table that meet these criteria

= sum(if(Field1 < 4 and date(start,'yyyy-MM-dd') <= today() and date(end,'yyyy-MM-dd') > today() ,1,0))

1 Solution

Accepted Solutions

Re: Expressionless Expressions

Make sure the values in the fields start and end are real dates and not string values. Or try using the date# function instead of date:

=sum(if(Field1 < 4 and date#(start,'yyyy-MM-dd') <= today() and date#(end,'yyyy-MM-dd') > today() ,1,0))

Perhaps you need to format today() too: date(today(),'YYYY-MM-DD')


talk is cheap, supply exceeds demand
2 Replies

Re: Expressionless Expressions

Make sure the values in the fields start and end are real dates and not string values. Or try using the date# function instead of date:

=sum(if(Field1 < 4 and date#(start,'yyyy-MM-dd') <= today() and date#(end,'yyyy-MM-dd') > today() ,1,0))

Perhaps you need to format today() too: date(today(),'YYYY-MM-DD')


talk is cheap, supply exceeds demand
Not applicable

Re: Expressionless Expressions

I am now getting results - thank you.  My only problem now is with the data being recovered, but that is my problem!

Thanks again

Community Browser