Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data in a crosstable (see attached spreadsheet) that describes when consultants were working on which projects. However, the data has null values in it (when a consultant wasn't working on a project). I want to replace these null values with zeros.
I tried to convert them in the original LOAD with an IF statement "if(isnull(<date>), 0, <date>)", where <date> is each of the date columns in the original spreadsheet. However, this won't work because I am not in control of this spreadsheet, and new date columns are being added every week and they need to be handled automatically.
Any ideas?
Thanks.
Peter, you pointed me in the right direction.
The solution has three parts to it.
Thanks Peter for the help!
Hi Simon,
what do you think about loading only the dates in a seperate statement and then do a JOIn to make sure every combination of consultant and date appears in your result table? The field value may still be NULL but the record should appear. You can then go with your if(isnull()... manipulation to replace NULLs by 0.
cheers
Florian
There might be something related to the interpreter of xlsx. If possible, convert the file to .xls and try the fllwg script:
SET NULLINTERPRET=0;
CROSSTABLE(ProjectDate, Data, 3) LOAD
*
FROM
[.\ExampleForecast.xls]
(biff, embedded labels, table is Sheet1$);
Tried also to read the file via ODBC with a preceding
SET NULLDISPLAY = 0;
but then you loose the information on the data, the columns will be read as F4, F5 etc
HTH
Peter
Florian, thanks for the response.
It sounds promising, but I;m not sure I follow. Would you mind posting an example of some kind to help me grasp what you are saying?
Thanks.
Peter, you pointed me in the right direction.
The solution has three parts to it.
Thanks Peter for the help!
Genial! Esto funcionó perfecto para mi problema!! Muchas gracias!
Great!! This answer help me to solve mi problem!
Thank a lot.
Regards