Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
Not applicable

Trying to get the count.

I have data as below...

ID  DateEnd

1  

2

3   10/31/2016.

Trying to get the count of ID's which has Date > today () and I am using the below expression,

count(if(date([DateEnd] >Today() ),[ID]))  but  it is not working

THnaks much

1 Solution

Accepted Solutions

Re: Trying to get the count.

How about this:

LOAD ID,

          Date(Date#(DateEnd, 'MM/DD/YYYY')) as DateEnd

FROM....

Count({<DateEnd = {"$(='>' & Date(Today()))"}>} ID)

View solution in original post

11 Replies
Digvijay_Singh
Honored Contributor III

Re: Trying to get the count.

Looks like you misplaced one bracket,

count(if(date([DateEnd]) >Today(),[ID]))

MVP
MVP

Re: Trying to get the count.

Try

count(if( [DateEnd] >Today() , [ID]))

Not applicable

Re: Trying to get the count.

Tried that...but no luck

MVP
MVP

Re: Trying to get the count.

Are your dates correctly intepreted by QV?

Why don’t my dates work?

Not applicable

Re: Trying to get the count.

yeah...when I put in listbox it is in the following format....10/31/2016

Re: Trying to get the count.

How about this:

LOAD ID,

          Date(Date#(DateEnd, 'MM/DD/YYYY')) as DateEnd

FROM....

Count({<DateEnd = {"$(='>' & Date(Today()))"}>} ID)

View solution in original post

Re: Trying to get the count.

Try like this using set expression

count({<[DateEnd] = {'=$(=>Today())'} >} ID)


Or script level


Load id, dateend where dateend => today();

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
vishsaggi
Esteemed Contributor III

Re: Trying to get the count.

It worked fine with this: Is your data coming from somewhere or just trying on some test data as mentioned below.

And hope there is no additional characters beside date like [10/31/2016.]

LOAD * INLINE [

ID,  DateEnd

1, 

2,

3,   10/31/2016

];

Textbox: I used stefan expression  = count(if( [DateEnd] >Today() , [ID]))

It displays 1.

Not applicable

Re: Trying to get the count.

Here comes my herroooo