Forum Discussion

Ondra's avatar
Ondra
Frequent Visitor
7 years ago
Solved

Difference between FIRSDATE and FIRSTNONBLANK while getting next row value

Hello!   I have a formula for a calculated column, which shows date of following row, like this:   NextTariffDate = IF( crm_flat_fees[dateuntil] <> BLANK() && RELATED(crm_services[servicety...
  • v-piga-msft's avatar
    7 years ago

    Hi Ondra ,

     

    If I understand your requirement correctly that you want to calculate the next row for serviceid.

     

    You could create a group index column firstly with dax

     

    Then create the calculated column with the formula below.

     

    Column = 
    CALCULATE (
     FIRSTNONBLANK('Table1'[serviceid],1),
     FILTER (
     'Table1',
     'Table1'[Index] =EARLIER ('Table1'[Index] )-1
     )
    )

    Here is the output.

     

     

    You could have a look at this blog to know more about FIRSTNOBLANK().

     

    Best Regards,

    Cherry