Forum Discussion

tomasjezek's avatar
tomasjezek
Frequent Visitor
2 years ago
Solved

Data Transformation - Create Milestone Start Date column based on data from two other columns

Hello PBI Community Members,   I would like to ask you to help me (and challenge you a bit) with following data transformation task.   I have a data set where there are Projects and their's Miles...
  • HotChilli's avatar
    2 years ago

    I used the Index column to make this a bit easier:

    ColumnE = 
    var _idx = TableK[Index]
    var _proj = TableK[PR]
    var _offsetDate = CALCULATE(MAX(TableK[Milestone Completion Date]), FILTER(TableK,  TableK[Index] = _idx -1))
    VAR _Result = IF ( TableK[Project Milestone] = "M1", TableK[Project Start Date], _offSetDate  )
    RETURN
        _Result