Forum Discussion

Taranggupta's avatar
Taranggupta
New Member
8 years ago
Solved

How to get previous row value for text column.

Hi,   I would like to get the previous row value for a text column using DAX.   Example: Text_column                     A                     B                     C   Expected Output:    ...
  • v-sihou-msft's avatar
    8 years ago

    Taranggupta

     

    In DAX, there's no order internally for records in table. You have to add an index column in your table. 

     

     

    PreviousText = CALCULATE(MAX(Table1[Text]),FILTER(Table1,Table1[Index]=EARLIER(Table1[Index])-1))

     

    Regards,