3 Replies Latest reply: Dec 21, 2017 10:15 PM by Yeo Poh sai

# Create var vYn1 and replace 8 with \$(vYn1) not working ?

Hi All

I have Below expression , working fine :-

money(

sum({\$<year = {\$(=max(year)-8)}, month = {"<=\$(=max({<year={\$(=max(year))}>} month))"}>}\$(ColumnDim51)/\$(Columndim89)/1000)

, \$(vMoneyFormatK))

Because , i need to reduce number of tab , i replace the 8 with variable. So i create vYn1 and set this var = 2009. and i replace the 8 with \$(vYn1) :-

money(

sum({\$<year = {\$(=max(year)-\$(vYn1))}, month = {"<=\$(=max({<year={\$(=max(year))}>} month))"}>}\$(ColumnDim51)/\$(Columndim89)/1000)

, \$(vMoneyFormatK))

But it display null value. Can some one share with me why ?

Paul

• ###### Re: Create var vYn1 and replace 8 with \$(vYn1) not working ?

my QVW !

• ###### Re: Create var vYn1 and replace 8 with \$(vYn1) not working ?

Hi,

This is because \$(vYn1) has value 2019 and =Max(year)-\$(vYn1) is calculating a number 8. and in your expression setanalysis is given as year = {\$(=max(year)-\$(vYn1))}, so it is year is getting value 8 thus you are getting null vaule.

assign vYn1 = 8 then it should work.

HTH

sushil

• ###### Re: Create var vYn1 and replace 8 with \$(vYn1) not working ?

Hi Sushil

Thank you very much for help me spot my mistake.

It there a way i can replace the Slide bar ? So that i dont need to create many button.

Paul