Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
May be you need a distinct in there:
=Count(DISTINCT If([Closing date]>= Today(2), [Candidate FullName]))
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
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'
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
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
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
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
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
I have attache the QV file
Thanks