Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

variable issue

Hi Experts,

I have to set variable for the following expression

'>=$(=Date(MonthStart(vMaxSalesDate)))<=$(=Date(vMaxSalesDate))'


when i give like

vCurrMnth='>=$(=Date(MonthStart(vMaxSalesDate)))<=$(=Date(vMaxSalesDate))'

it is giving error.


Pls help me to solve this

1 Solution

Accepted Solutions
sunny_talwar

Sorry I misread your earlier expression, it was correct if Date is DD/MM/YYYY then you had it right. Only other thing I can think of is to try it like this:

=SUM({<MonthYear=, Date={"$(vCurrMnth)"}>} DAYS)

View solution in original post

17 Replies
sunny_talwar

Try defining the variable like this may be and check if that works:

vCurrMnth= ='>=' & Date(MonthStart(vMaxSalesDate)) & '<=' & Date(vMaxSalesDate))

Best,

Sunny

Not applicable
Author

its showing null value

sunny_talwar

Are you using the above in a set analysis expression?

There are few things that could be going wrong?

1) variable should be ='>=' & Date(MonthStart(vMaxSalesDate)) & '<=' & Date(vMaxSalesDate)) with the equal sign

2) What is vMaxSalesDate? Is it an actual date?

Would you be able to share a sample application?

b_garside
Partner - Specialist
Partner - Specialist

Is this being used in a Calendar object as a search string?

Not applicable
Author

vMaxSalesDate=Date(Max(Calendardate))

i try checking with text box.

it is just displaying as it is



Not applicable
Author

i hav to use this in an expression of pivot table.

pls help

sunny_talwar

Are you trying vCurrMnth or $(vCurrMnth)? My guess is that you are trying vCurrMnth. Try $(vCurrMnth) and see what you get.

Best,

Sunny

Not applicable
Author

now the text box is showing value as

>= 01/06/2015 <= 05/06/2015

i need to use the below exprn in pivot table.

SUM({<MonthYear=,Date={'$(vCurrMnth)'}>} DAYS)

its showing null values

sunny_talwar

What is the format of MonthYear? If it is anything except 'DD/MM/YYYY', you won't see any results. You need to change the format of your variable to the same format as MonthYear.

HTH

Best,

Sunny