Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data from particular Date

Hi all,

I am displaying count in KPI Using below expression.

Measures:

count({$<client_id = {12},CanonicalDate = ${">= (vOF_Start_Date)"}>}invitation_id)

vOF_Start_Date is a variable, where i have assigned the date for it.


Let vOF_Start_Date = 04-29-2014;

I need the count from the date 04-29-2014 but it's picking the count from before that.

Anyone help on this.

Regards,

Pramod

8 Replies
tamilarasu
Champion
Champion

Hi Kumar,

count({$<client_id = {'12'},CanonicalDate = {">= $(=vOF_Start_Date)"}>}invitation_id)

Not applicable
Author

Sorry nagraj,

It's picking all the data.

Not working.

tamilarasu
Champion
Champion

Paste the above expression in text box and see whats the value of  $(=vOF_Start_Date).

Edit: Just remove the single quote from client_id = {'12'}. Try below one

count({$<client_id = {12},CanonicalDate = {">= $(=vOF_Start_Date)"}>}invitation_id)

Anonymous
Not applicable
Author

try this:

=count({<client_id = {'12'},CanonicalDate ={'>=$(=vOF_Start_Date)'}>} invitation_id)


Also make sure, your CanonicalDate and variable date format both should be same

jonathandienst
Partner - Champion III
Partner - Champion III

First of all, you should not use a Let there. The Let will produce the result -2039 (4 - 29 - 2014). You need to use Set to store a literal.

Set vOF_Start_Date = 04-29-2014;

or

Let vOF_Start_Date = Date#('04-29-2014');

Next - be careful of spaces in a set expression. And the variable reference needs to $ expansion.


=count({$<client_id = {12}, CanonicalDate = ${">=$(vOF_Start_Date)"}>}invitation_id)

or

=count({$<client_id = {12}, CanonicalDate = ${">=$(=vOF_Start_Date)"}>}invitation_id)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi nagraj,

when i paste it in textbox $(=vOF_Start_Date), I am getting value as -2039.

Here we are wrong.

If i paste date(vOF_Start_Date)  then i am getting the date of year 1894.

with only (vOF_Start_Date)  blank.

where i am doing wrong

tamilarasu
Champion
Champion

The above expression will work only when the $(=vOF_Start_Date) is 04-29-2014. As said by Jonathan you should use set instead of let statement.

Set vOF_Start_Date = 04-29-2014;

Not applicable
Author

Hi Jonathan,

I tried all the scenarios please check my sample .qvf.

FYI, I have used different name for variables