Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Prepare data for Gantt visual

I'm trying to prepare my data to visualise in a gantt schema but I can't figure out how to transform it correctly.  The data is structured so that i have one row per ID, and then multiple columns fo...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Anonymous 

    I've managed to group and index per id, so that I per ID, get all the dates in a sorted id with an indexed count. And then starts over again per next ID. Which is perfect,

    My issue now is that I want to duplicate my date/timestamp column, but shifted one step so that the date/timestamp is one step behind the other one. So that the end date is the start date of the next row. 

     

    Edit: Solved with calculated column:

    End Timestamp =
    CALCULATE(
    MIN('Table'[Start Timestamp]),
    FILTER(
    'Table',
    'Table'[Key] = EARLIER('Table'[Key]) &&
    'Table'[index] = EARLIER('Table'[index]) + 1
    )
    )