Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using variable information in Label

I have created a variable called vBegDate and it looks like this in my load:

LET vBegDate = Num(makedate(year(Today()),1,1));

I have to use the first day of the first month for each year to do comparisons.

I would like to use this variable in a label that would say 'Beginning Value as of _________ (put the variable date here)

Is this possible to do????

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

Vlad Gutkovsky is correct. In addition you may want to wrap the vBegDate variable in the Date() function to get a formatted date instead of the date numeric number.

Examples:

='Beginning value as of ' & Date(vBegDate)

='Beginning value as of ' & Date(vBegDate, 'MM/DD/YYYY')

View solution in original post

2 Replies
vgutkovsky
Master II
Master II

Sure! You would just need to preface the text label with an equal sign to indicate that it's an expression:

='Beginning value as of ' & vBegDate

Regards,

Vlad

Not applicable
Author

Vlad Gutkovsky is correct. In addition you may want to wrap the vBegDate variable in the Date() function to get a formatted date instead of the date numeric number.

Examples:

='Beginning value as of ' & Date(vBegDate)

='Beginning value as of ' & Date(vBegDate, 'MM/DD/YYYY')