Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day!
I can't get the idea why IsNull function dosn't work properly in my LOAD statement.
When, my SUM has values, I get an adequete result. Still, I can't convert Null data to ZERO values.
Please help!
Try this work around:
tmp:
LOAD Item_number
,Sum(Quantity_Reserved) as Quantity_Reserved
Resident RESERVED
Group By Item_number
;
NoConcatenate
tmp2:
LOAD Item_number
,If(Len(Trim(Quantity_Reserved)) = 0, 0, Quantity_Reserved) as Quantity_Reserved2
Resident tmp;
DROP Table tmp;
Rename Field Quantity_Reserved2 to Quantity_Reserved;
Sum of null values , i.e. Sum(Null()) would give zero itself, isn't it?
Unfortunatelly no It would give NULL, thus I would not be able to do mathematical calculations with it.
Hi,
try this
if(len(trim(sum(quantity_reserved))=0,0...
Same result
Hi,
I try this:
Data1:
LOAD
Item,
If(Qty = '', null(), Qty) as Qty
INLINE [
Item, Qty
1,
2,
3,
4,
5, 10
6,
7,
];
NoConcatenate
Data2:
LOAD
Item,
Sum(Qty) as Qty
Resident Data1
Group by Item
;
DROP Table Data1;
Saludos
I guess, the problems lies somewhere else. Could you post a sample qvw with sample data ?
Try this work around:
tmp:
LOAD Item_number
,Sum(Quantity_Reserved) as Quantity_Reserved
Resident RESERVED
Group By Item_number
;
NoConcatenate
tmp2:
LOAD Item_number
,If(Len(Trim(Quantity_Reserved)) = 0, 0, Quantity_Reserved) as Quantity_Reserved2
Resident tmp;
DROP Table tmp;
Rename Field Quantity_Reserved2 to Quantity_Reserved;
I don't understand WHY!!! but it works.. thank you!