Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gamaplast
Contributor III
Contributor III

Pivot like GANNT

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.


1 Solution

Accepted Solutions
sunny_talwar

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

];


Capture.PNG

View solution in original post

3 Replies
sunny_talwar

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

];


Capture.PNG

gamaplast
Contributor III
Contributor III
Author

...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. 🙂

sunny_talwar

No problem at all