Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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.


Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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
MVP
MVP

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
MVP
MVP

No problem at all