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: 
Anonymous
Not applicable

Using variables in set analysis

I am trying to build an expression having set analysis. sum( {< Date = {" >= $(=vFirstDate)"}> } Data). is what i built to get the sum(data) where Date > the value in variable vFirstDate. But its not giving the correct result.

Can someone help me with this.

1 Solution

Accepted Solutions
sunny_talwar

May be you don't have the correct format of date within your set analysis... check here:

Dates in Set Analysis

or try this:

Sum({<Date = {"=Date >= vFirstDate"}>} Data)

or

Sum({<Date = {"=Date >= $(vFirstDate)"}>} Data)

View solution in original post

5 Replies
sunny_talwar

May be you don't have the correct format of date within your set analysis... check here:

Dates in Set Analysis

or try this:

Sum({<Date = {"=Date >= vFirstDate"}>} Data)

or

Sum({<Date = {"=Date >= $(vFirstDate)"}>} Data)

vishsaggi
Champion III
Champion III

Does the format of your Date and variable field are same?

Try this?

= Sum({< Date = { ">= $(vFirstDate)" } }>} Data)

hectorvega
Contributor III
Contributor III

Check on the model (CTRL T) the contents of the table where the date is stored, and review the format. Maybe this is the problem.

To solve this, on the load convert the date field to the correct format usinf date(field,'mm-dd-yyyy') for example.

I hope this could help.

Anonymous
Not applicable
Author

Try like this:


sum({<Date={">=$(=vFirstDate)  <= $(=vFirstDate)"}>}data)

susovan
Partner - Specialist
Partner - Specialist

Try this,

sum( {< Date = {" >=$(vFirstDate)"}> } Data)

Warm Regards,
Susovan