Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Can Pick(Match using in load script ?


I get error on this script :- Sum([Row Total] * Pick(Match([Price Currency], 'EUR', 'NT', 'USD', 'YEN', 'BAH', 'SGD'), 1.64, (1/24), 1.25, 0.012, 1/24, 1)) as sales_n,

Hi All

I have below scipt from expression it work fine :-


Sum(total_ar * Pick(Match(US_Cust_AR, 'EUR', 'NT', 'USD', 'YEN', 'BAH', 'SGD'), 1.64, (1/24), 1.25, 0.012, 1/24, 1))

I have convert it to become load script :-

Sum([Row Total] * Pick(Match([Price Currency], 'EUR', 'NT', 'USD', 'YEN', 'BAH', 'SGD'), 1.64, (1/24), 1.25, 0.012, 1/24, 1)) as sales_n,

May i know where go wrong on above above script ?


Paul Yeo

1 Solution

Accepted Solutions
paulyeo11
Master
Master
Author

Hi Sir

Thank you for your advise.

Some one have already advise me , my issue is I need to remove the sum to make it work.

Paul

View solution in original post

2 Replies
Vegar
MVP
MVP

You are not showing us the whole loaded statement, but I would guess be that you are aggregating in a load statement without a GROUP BY.

Load

Sum([Row Total] * Pick(Match([Price Currency], 'EUR', 'NT', 'USD', 'YEN', 'BAH', 'SGD'), 1.64, (1/24), 1.25, 0.012, 1/24, 1)) as sales_n,

Dim1,

Dim2

From  source

Group by Dim1, Dim2;

 

Or you might want to skip the aggregation like this.

Load

[Row Total] * Pick(Match([Price Currency], 'EUR', 'NT', 'USD', 'YEN', 'BAH', 'SGD'), 1.64, (1/24), 1.25, 0.012, 1/24, 1) as sales_n,

Dim1,

Dim2

From  source;

paulyeo11
Master
Master
Author

Hi Sir

Thank you for your advise.

Some one have already advise me , my issue is I need to remove the sum to make it work.

Paul