Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have 2 tables like this:
table1:
LOAD * INLINE [
account, Amount
a, 1200
b, 500
c, 100
];
table2:
LOAD * INLINE [
Group, Accounts
g1, "a"
g2, "a,b,c"
g3, "b"
];
i use set analysis and concat, to group:
sum( {$< account = { $(=Concat(Accounts,',')) }>} Amount)
but the result is the total (1800)
[:S]
Thanks all for the help,
ja
Hi,
is there a reason why your table could not look like this:
table2:
LOAD * INLINE [
Group, account
g1, a
g2, a
g2, b
g2, c
g3, b
];
Rainer
Hi Rainer,
There is not a real reason, is only a test structure for understand:
sum( {$< account = { $(=Concat(Accounts,',')) }>} Amount)
Thanks,
ja
with the current structure of table2, this expression wont work..as in one Accounts, you have several of the variables 'account'.
if you change the structure of the table to what Rainer suggests, that should work..
I looked at it, and find that the following expression in the table gives the desired result:
=Sum(If(Concat(total account,',')=Accounts,Amount,0))
Check if you are mixing your account and Accounts in the expression.
Rainer, Navee, Vidyut
if i changed the structure, work fine,now.
thanks a lot...
ja