Forum Discussion

aashok611's avatar
aashok611
Frequent Visitor
5 years ago
Solved

How to fill missing out row with below valid value, like previous row content

Hi All, Please check below table, i took a portion of a big dateset, i need to fill above cell identified as "Check", with below cell value , for single above value with below DAX i can get, not mo...
  • MFelix's avatar
    5 years ago

    Hi aashok611 ,

     

    Try the following code for a calculated column:

     

     

    CheckDateFill = 
    IF (
        'CheckDateTable'[Date2 (Check)] = "Check",
        SELECTCOLUMNS (
            TOPN (
                1,
                FILTER (
                    ALL ( 'CheckDateTable' ),
                    'CheckDateTable'[Index] > EARLIER ( 'CheckDateTable'[Index] )
                        && 'CheckDateTable'[Date2 (Check)] <> "Check"
                )
            ),
            "DateCheck", 'CheckDateTable'[Date1]
        ),
        'CheckDateTable'[Date1]
    )