Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I need to rapresent my data in a pivot table, like a Gannt rapresentation; in my DB the records have these 3 fields:
- Machine
- StartWorkingDay
- EndWorkingDay
I thing that the best way to get my porpouse is to trasform my data multiplying them as this example:
Machine StartWorkingDay EndWorkingDay
A 01/07/16 05/07/16
Machine WorkingDay
A 01/07/16
A 02/07/16
A 03/07/16
A 04/07/16
A 05/07/16
Is there a Qv way to do it?
Is there a better idea to reach my goal?
Thanks.
Try this:
Table:
LOAD Machine,
Date(StartWorkingDay + IterNo() - 1) as WorkingDay
While StartWorkingDay + IterNo() - 1 <= EndWorkingDay;
LOAD * Inline [
Machine, StartWorkingDay, EndWorkingDay
A, 01/07/16, 05/07/16
];
Try this:
Table:
LOAD Machine,
Date(StartWorkingDay + IterNo() - 1) as WorkingDay
While StartWorkingDay + IterNo() - 1 <= EndWorkingDay;
LOAD * Inline [
Machine, StartWorkingDay, EndWorkingDay
A, 01/07/16, 05/07/16
];
...Sorry for the delay, but I've gone away for my Summer Holidays 🙂
Your solution works so fine!! Thank you so much for your help. 🙂
No problem at all