Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I have the small req like below and attached the sameple data as well and i have to develop the same at design level.
If ACTUAL BALANCE is -ve then we have to replace with 0 for all the products.
If PRODUCTS FD/RD have blank then we have replace TARGET BALANCE by ACTUAL BALANCE along with the above condition.
The sample output has been attached.
Thanks,
Ajay
Check the attachment
EDITED
I think this is what you're looking for....see attached
TEST:
LOAD * INLINE
[
ITEM,ACTUALBALANCE,TARGETBALANCE,TYPE
100,-980,,CA
101,345,4564,SA
102,454,56563,CA
103,-230,2525,SA
104,-42344,,FD
105,25252,,RD
106,4524525,,FD
107,78787,,RD
108,5878,,FD
109,4554,1234,SA
110,456,535,CA
];
TEST2:
LOAD
ITEM,
if(ACTUALBALANCE < 0, 0, ACTUALBALANCE) as ACTUAL,
TYPE,
if(TYPE = 'FD' OR TYPE = 'RD', if(ACTUALBALANCE < 0, 0, ACTUALBALANCE), TARGETBALANCE)AS TARGET
RESIDENT TEST;
DROP TABLE TEST;
Any hint from anyone...
Thanks Christian...Its good..But i have to develop the same in Design level.Because all the fields are coming from various qvd's in data model.
Thanks,
Ajay
Updated sample, not sure if this is still off but hopefully leads you in the right direction.
Any suggestions from anyone....
Thanks,
Dhanu
Let me know what do you mean by Design level (it is on front end or may be it is on load script level).
We need to develop at front end.
Check the attachment
On the straight table write Dimension expression like
Dimension:- Item
Dimension:- Type
Exper(For Actual):- if(sum( ACTUALBALANCE) < 0 ,0, sum(ACTUALBALANCE))
Exper(For TARGET):- if(TYPE = 'FD' OR TYPE = 'RD', if(sum(ACTUALBALANCE) < 0, 0, sum(ACTUALBALANCE)), Sum(TARGETBALANCE))