Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends
I have two table same below:
//------------------------------------------------
GacBranch:
LOAD * INLINE [
Branch, Level6
1600, 001181600
1610, 001181610
1611, 001181611
1612, 001181612
];
Voucher:
LOAD * INLINE [
Branch, Sixth, Price
1600, 001181611, 100
1600, 001181600, 200
1600, 001181612, 250
1600, 001181611, 150
1611, 001181600, 300
1611, 001181612, 350
1611, 001181611, 50
1610, 001181610, 250
];
//------------------------------------------------
i want use straight table with this :
dimension = Branch
Expression = Sum(Price)
but i want use set analysis condition , that sum price when (Sixth and Branch field value in Voucher table, not exist in Branch and Level6 field value in GacBranch table)
my result that i expected is:
Branch sum(Price)
1600 500
1611 650
1610 0
please help me how i can do it?
Try this?
GacBranch:
LOAD *, Branch&Level6 AS Key1 INLINE [
Branch, Level6
1600, 001181600
1610, 001181610
1611, 001181611
1612, 001181612
];
LEFT JOIN
Voucher:
LOAD *, Branch&Sixth AS Key2 INLINE [
Branch, Sixth, Price
1600, 001181611, 100
1600, 001181600, 200
1600, 001181612, 250
1600, 001181611, 150
1611, 001181600, 300
1611, 001181612, 350
1611, 001181611, 50
1610, 001181610, 250
]WHERE NOT Exists(Key1, Branch&Sixth);
ok , but can we use set analysis directly , without use filter in edit script?
May be
Sum(If(Sixth <> Level6,Price))
Regards,
Antonio