Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
aashok611
Frequent Visitor

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 more than one value i could not get, Hope some one can

if('F_Data (2)'[Custom] = "Check",
LOOKUPVALUE(
'F_Data (2)'[Custom],
'F_Data (2)'[Index],
'F_Data (2)'[Index] +1 ),
'F_Data (2)'[Custom])

 

DNoIndexProgressDate1Date2 (Check)Required like this
ABC-CC-DD-EE-01'115%10-Jan-202110-Jan-202110-Jan-2021
ABC-CC-DD-EE-01'245%null Check15-Mar-2021
ABC-CC-DD-EE-01'3100%15-Mar-202115-Mar-202115-Ma-2021
ABC-CC-DD-EE-02'410%5-May-20215-May-20215-May-2020
ABC-CC-DD-EE-02'525% null Check12-Jun-2020
ABC-CC-DD-EE-02'665%null Check12-Jun-2020
ABC-CC-DD-EE-02'790%12-Jun-202112-Jun-202112-Jun-2020
ABC-CC-DD-EE-02'8100%null  
ABC-CC-DD-EE-03'95%10-Jan-2021 10-Jan-202110-Jan-2021
ABC-CC-DD-EE-03'1015%nullCheck15-Jun-2020
ABC-CC-DD-EE-03'1125%nullCheck15-Jun-2020
ABC-CC-DD-EE-03'1145%15-Jun-202115-Jun-202115-Jun-2020
ABC-CC-DD-EE-03'1275%nullCheck20-Jun-2020
ABC-CC-DD-EE-03'1390%nullCheck20-Jun-2021
ABC-CC-DD-EE-03'14100%20-Jun-202120-Jun-202120-Jun-2021
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

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]
)

 

 

MFelix_0-1626946421744.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

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]
)

 

 

MFelix_0-1626946421744.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors