Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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;