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

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

17 Replies
Not applicable
Author

Hi,

Monthyear is like MMM YYYY (jun 2015)

ok i removed it and used date alone.

date format is DD/MM/YYYY.

but still null values.

Not applicable
Author

Any other suggestions plssssssssssss

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)

Not applicable
Author

showing garbage after '<='

sunny_talwar

Hahahaha damn it man. Try this I guess:

=SUM({<MonthYear=, Date={"$(='>=' & Date(MonthStart(vMaxSalesDate)) & '<=' & Date(vMaxSalesDate)))"}>} DAYS)

maxgro
MVP
MVP

post your .qvw

or remove the label of your expression and try to find the problem looking at the popup as in image

1.png

md_qlikview
Creator II
Creator II

Yes you can verify your output as mentioned by Massimo. I have created this kind of variable once, but as per my knowledge i simply wrote this as below

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

pratap6699
Creator
Creator

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

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