Forum Discussion
aashok611
5 years agoFrequent 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])
| DNo | Index | Progress | Date1 | Date2 (Check) | Required like this |
| ABC-CC-DD-EE-01' | 1 | 15% | 10-Jan-2021 | 10-Jan-2021 | 10-Jan-2021 |
| ABC-CC-DD-EE-01' | 2 | 45% | null | Check | 15-Mar-2021 |
| ABC-CC-DD-EE-01' | 3 | 100% | 15-Mar-2021 | 15-Mar-2021 | 15-Ma-2021 |
| ABC-CC-DD-EE-02' | 4 | 10% | 5-May-2021 | 5-May-2021 | 5-May-2020 |
| ABC-CC-DD-EE-02' | 5 | 25% | null | Check | 12-Jun-2020 |
| ABC-CC-DD-EE-02' | 6 | 65% | null | Check | 12-Jun-2020 |
| ABC-CC-DD-EE-02' | 7 | 90% | 12-Jun-2021 | 12-Jun-2021 | 12-Jun-2020 |
| ABC-CC-DD-EE-02' | 8 | 100% | null | ||
| ABC-CC-DD-EE-03' | 9 | 5% | 10-Jan-2021 | 10-Jan-2021 | 10-Jan-2021 |
| ABC-CC-DD-EE-03' | 10 | 15% | null | Check | 15-Jun-2020 |
| ABC-CC-DD-EE-03' | 11 | 25% | null | Check | 15-Jun-2020 |
| ABC-CC-DD-EE-03' | 11 | 45% | 15-Jun-2021 | 15-Jun-2021 | 15-Jun-2020 |
| ABC-CC-DD-EE-03' | 12 | 75% | null | Check | 20-Jun-2020 |
| ABC-CC-DD-EE-03' | 13 | 90% | null | Check | 20-Jun-2021 |
| ABC-CC-DD-EE-03' | 14 | 100% | 20-Jun-2021 | 20-Jun-2021 | 20-Jun-2021 |
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] )
1 Reply
- MFelixSuper 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] )