Forum Discussion

Andregewehr's avatar
Andregewehr
Icon for Helper I rankHelper I
3 years ago
Solved

Add new column with next non blank value

Hi everyone,    I have this table:   I want to add a new column filling the blank values with the next value for each SKU (A, B and C) and the next date. I tried this DAX formula:   FIRS...
  • FreemanZ's avatar
    3 years ago

    hi Andregewehr 

    try like:

    Column =
        MAXX(
            TOPN(
                 1,
                 FILTER(
                    'Table',
                    'Table'[SKU] = EARLIER('Table'[SKU]) && 'Table'[Date] <= EARLIER('Table'[Date]) && 'Table'[Stock] <>BLANK()
                  ),
                  'Table'[Date]
             ),
             'Table'[Stock]
        )