Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

paulyeo11
Not applicable

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

7 Replies
paulyeo11
Not applicable

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.

sunny_talwar
Not applicable

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

What is the number you are hoping to see?

settu_periasamy
Not applicable

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

tresesco
Not applicable

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

paulyeo11
Not applicable

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

settu_periasamy
Not applicable

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

paulyeo11
Not applicable

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

Hi Settu

Thank you it work fine.

Paul