Forum Discussion

RKM's avatar
RKM
Icon for Helper IV rankHelper IV
4 years ago
Solved

Derived Column based on Previous Value in Same

Dear Experts, I have apparantly simple problem but finding it hard to resolve. So, I got a table with 2 columns in Power BI as below. Item ID----Session A ----1 A ----2 B ----1 B ----4 B ----...
  • amitchandak's avatar
    4 years ago

    RKM , Try a new column like

     

    new column =
    var _cnt = countx(filter(Table, [In_Session] = earlier([In_Session]) -1 && [Item_ID] = earlier([Item_ID])), [Item_ID])
    return
    if( isblank(_cnt) , "Yes", "No")