Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

timroycs
New Contributor III

Variables in Column Label not working.

Hello All,

I have a dynamic label expression that works when It is dropped as is into a straight table column label like so:

=Date(MonthStart(AddMonths(Max((RDateofPmnt),-11),'YYYY-MM'))

However, when I use variables to store the expression, broken in 2 so I can insert a column specific offset number, it does not

work:

$(=(var1 & '-11' & var2))

I have tried several alternatives but no luck.

When I use a similar tactic for expressions and conditions, it does work.

Just the Label expression does not.

Thanks for any help.

Tim Roy

4 Replies

Re: Variables in Column Label not working.

Variables containing expressions need to be dollar-expanded:

=$(var1) & '-11' & $(var2)


talk is cheap, supply exceeds demand
timroycs
New Contributor III

Re: Variables in Column Label not working.

But they are not valid expressions until the strings are combined, just pieces

Re: Variables in Column Label not working.

Oh well, no idea in that case. But try creating a variable with a parameter:

var1: Date(MonthStart(AddMonths(Max((RDateofPmnt),$1),'YYYY-MM'))


label: =$(var1(-11))


talk is cheap, supply exceeds demand
timroycs
New Contributor III

Re: Variables in Column Label not working.

Thanks for the idea, that works.

I still wonder why it didn't work the other way.

I worked for Expressions and Conditions, just not Labels

Anyways, onward ..... and

Regards

Community Browser