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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
aashok611
New Contributor

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
Esteemed Contributor III

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
Esteemed Contributor III

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
Users online (3,586)