Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

Why RATE_C must move out side the expression ?

Hi All

I have 1 expression 1 return wrong value  :-

sum({$<year = {$(=max(year)-0)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}(sales)/1000)

*RATE_C

Below expression i move RATE_C out side , it return right value :-

sum({$<year = {$(=max(year)-0)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}(sales*RATE_C)/1000)

May i know why ?

Paul

1 Solution

Accepted Solutions
paulyeo11
Valued Contributor II

Re: Why RATE_C must move out side the expression ?

Hi All

I have found the solution , after i change the SOURCE_C to SOURCE :-

LOAD * INLINE [

SOURCE, CURRENCY_NAME,RATE_C

TDSS, SG, 1

TDSKL, RM, 0.38286

TDSID, ID, 0.00011

TDST, TH, 0.04

TDSPG, RM, 0.38286

ADL, SG, 1

];

1 Reply
paulyeo11
Valued Contributor II

Re: Why RATE_C must move out side the expression ?

Hi All

I have found the solution , after i change the SOURCE_C to SOURCE :-

LOAD * INLINE [

SOURCE, CURRENCY_NAME,RATE_C

TDSS, SG, 1

TDSKL, RM, 0.38286

TDSID, ID, 0.00011

TDST, TH, 0.04

TDSPG, RM, 0.38286

ADL, SG, 1

];

Community Browser