Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

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

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

];

View solution in original post

1 Reply
paulyeo11
Master
Master
Author

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

];