Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My Data is from excel file at it is looks like as below:
Problem is that colum names are variable so it will keep on increasing with dates.so i need dynamic calculation for the required below output.
| WBS | Fields1 | 03-Jan-11 | 10-Jan-11 | 17-Jan-11 | 24-Jan-11 | 31-Jan-11 | 07-Feb-11 | 14-Feb-11 |
| Project & Construction Management | 10 | 20 | 30 | 40 | 50 | 60 | 70 |
my output would be
| WBS | Fields | 03-Jan-11 | 10 |
| Project & Construction Management | 10-Jan-11 | 20 | |
| 17-Jan-11 | 30 | ||
| 24-Jan-11 | 40 |
Thanks
Dannzy
If you use a crosstable load prefix, this will be dynamic in the way that it will take any amount of fields that follow a defined number of qualifier fields, so if your table expands in the fields named like dates, this should not be a problem.
Try something like
CROSSTABLE (DateField, Value) LOAD * from Table;
You can state the number of qualifier fields as third parameter, if different than 1.
You need to get your qualifier field, WBS (+ ??), to be loaded first in order.
Is this what you were asking for?
Regards,
Stefan