Forum Discussion

carenel's avatar
carenel
Frequent Visitor
4 years ago
Solved

Search and fill previous dates with the same data

Hello community,   I want to create a new column with variables. The conditions are: - if initial date = date  then the result is oil but it has to fill the previous dates with the same oil price....
  • Jihwan_Kim's avatar
    4 years ago

    Hi,

    Please check the below picture and the attached pbix file, that is for creating a new column.

     

     

    Final result CC =
    VAR newtable =
    FILTER ( SUMMARIZE ( Data, Data[date], Data[oil] ), Data[date] = Data[initial] )
    RETURN
    MAXX ( newtable, Data[oil] )