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

Expression works in one document, not another

Hi All,

Hope this is something easy, but it is driving me crazy.  I have a variable, eLastDayOfMonth, set to this expression:

=date(floor(monthend(addmonths(Today(),-1))), 'YYYYMMDD')

I have a textbox that shows this variable in a document, with this expression:

=$(eLastDayOfLastMonth)

Works great.  In one document.  In another, I copied the same expressions and it displays a dash: -

What could cause this?  Are there document settings that could affect this?

Thanks,

Blair

6 Replies
jpapador
Partner - Specialist
Partner - Specialist

Are the number of dates in one app the same as the other?  If the expression has 2 possible values a text box will display a dash.

its_anandrjs

Hi,

Check there is no error while you copy and paste this expression in the variable  =date(floor(monthend(addmonths(Today(),-1))), 'YYYYMMDD')

and also check = sign in the variable.

Hope this helps

Thanks & Reagrds

Not applicable
Author

The expression isn't related to a date at all.  It uses Today().  There are multiple date columns in both documents.  And believe me, I have checked the syntax of both over and over.  They are exactly the same.

jpapador
Partner - Specialist
Partner - Specialist

ah right my bad.  Have you tried just =eLastDayOfLastMonth without the dollar sign expansion?

Not applicable
Author

That doesn't work, and without the equals sign it of course shows the text of the expression.  I'm thinking it has to be document related, as the expressions are identical and don't explicitly involve the data at all.

Not applicable
Author

After having my coffee, I realized it was a typo with the actual variable names.  Sorry to cause a ruckus over a silly mistake.