Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression

HI

I am new to QlikView.

I am trying to write an expression that returns the number of due date that are grater or equals today's date,but the expression is returning wrong information. This is the expression

=Count(if([Closing date]>= Today(2),[Candidate FullName]))

Thanks and Regards

Priscilla

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

I don't want to download an exe from an unknown web site. Can you not just attach the file to your answer? ("Use advanced editor" then "Attach")

HIC

View solution in original post

11 Replies
sunny_talwar

May be you need a distinct in there:

=Count(DISTINCT If([Closing date]>= Today(2), [Candidate FullName]))

Gysbert_Wassenaar

Without more information we won't be able to give you an answer, just guesses. Can you post a small qlikview document or that demonstrates the problem? See this document for more information: Preparing examples for Upload - Reduction and Data Scrambling


talk is cheap, supply exceeds demand
jonathandienst
Partner - Champion III
Partner - Champion III

First off, you should probably use Today() or Today(1). Secondly, is [Closing date] a proper (numeric) date field, or is it a string? Numeric value will right align by default in a list box, strings will left align.

If its a string, convert it to a date during the load using:

    Date(Date#([Closing date]. '<format of closing date>')) As [Closing date],

where <format of closing date> is the format of the field in your source, eg 'YYYY-MM-DD' or 'D MMM YYYY'

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
hic
Former Employee
Former Employee

If you use

   Count(distinct if([Closing date]>= Today(2),[Candidate FullName]))

the QIX engine will count combinations of [Closing date] and [Candidate FullName]. In other words, if a candidate is associated with several closing dates it will always count the wrong thing.

Better then to use Set Analysis, which will count the right thing:

   Count(distinct {$<[Closing date]={">=$(=Today(2))"}>} [Candidate FullName]))

HIC

Not applicable
Author

Hi Henric

I did try the set Analysis you gave me,but it is giving me wrong results,I have a list box of closing dates and i have a text box that is suppose to shows number of closing date from today onward,when ever i click on the text box i want to see the closing date from today onward on the closing dates list.

lease advise

Thanks and Regards

Priscilla

hic
Former Employee
Former Employee

The Set Analysis expression will calculate a number and display this. So if you use it in a text box, you will see this number here. If the number isn't correct, then you need to post the qvw file so that we can look at what goes wrong.

Clicking on the text box will not make any selections, so you cannot change what you see in the list box this way.

HIC

Not applicable
Author

Download Priscilla's recrit.qvw

please check the link above the text box that is suppose to show the number is the due count.

Thanks

hic
Former Employee
Former Employee

I don't want to download an exe from an unknown web site. Can you not just attach the file to your answer? ("Use advanced editor" then "Attach")

HIC

Not applicable
Author

I have attache the QV file

Thanks