7 Replies Latest reply: May 20, 2016 2:58 PM by Yeo Poh sai

# Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

Hi All

My below expression working fine :-

Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> } sales)

But now i not measure by sales , instead i meansure by eXP filed. When compute sum by eXP the expression is below :-

Sum({<eXP={"eXP"}>}Amount)*-1

So my imagine expression should be below :-

Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

But it display null value. Where go wrong ?

Paul

• ###### Re: Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

My QVW doc , Opps i press too fast , so end up my title only expression.

• ###### Re: Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

What is the number you are hoping to see?

• ###### Re: Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

May be this?

Sum({<YTD_Flag={1}, Year={">\$(=year(today())-2)"}, eXP={'eXP'}>}Amount)*-1

• ###### Re: Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

Hi TreseSco

I need to convert Table 1 into chart 2 for eXP.

Which the result look some thing like chart 1 , which measure on sales not eXP.

My chart 1 Expression as below working fine for meansure sales :-

money(

Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> } sales/\$(Columndim89)/1000)

, \$(vMoneyFormatK))

When i try expression from treseco expression below :-

Sum({<YTD_Flag={1}, Year={">\$(=year(today())-2)"}, eXP={'eXP'}>}Amount)*-1

I don't get it right.

the correct bar value for chart 2 should be same as Table 1.

Paul

• ###### Re: Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

Hi Paul,

May be you can copy the same chart and convert to Bar chart (Just guess, not sure about the value)

check the attachment

• ###### Re: Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

Hi Settu

Thank you it work fine.

Paul

• ###### Re: Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

Hi Paul,

paul yeo wrote:

Hi All

My below expression working fine :-

Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> } sales)

- i don't see the Field "IsInYTD" in your data model, Is that YTD_Flag?

But now i not measure by sales , instead i meansure by eXP filed. When compute sum by eXP the expression is below :-

Sum({<eXP={"eXP"}>}Amount)*-1

So my imagine expression should be below :-

Sum({<IsInYTD={1}, Year={">\$(=year(today())-2)"}> }{<eXP={"eXP"}>}Amount)*-1)

- Are you trying to display Greater than of Selected year + exp="eXP", if so, may be try like..

=Sum({<YTD_Flag={1},Year={">\$(=year(today())-2)"}>+<eXP={"eXP"}>}Amount)*-1