Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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
Master
Master
Author

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

sunny_talwar

What is the number you are hoping to see?

settu_periasamy
Master III
Master III

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
MVP
MVP

May be this?

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

paulyeo11
Master
Master
Author

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
Master III
Master III

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
Master
Master
Author

Hi Settu

Thank you it work fine.

Paul