Forum Discussion
Help on Imputing the blank date column with the average of difference between the 2 previous dates
- 5 years ago
Anonymous , add one more condition
new column =
var _1 = AverageX(filter(Table, not(isblank([Start Date])) && not(isblank([Finish Date])) , datediff([Start Date], [Finish date], day))
returnif([status]= "Finish,
Switch(True() ,not(isblank([Start Date])) , [Start Date],
isblank([Start Date]) && not(isblank([Finish Date])), [Finish Date] - _1,
blank()) , blank() )
Hi amitchandak ,
Thank you for your help!
I just have a concern , that the new column should only calculate the new date when the status is "Finish" and not "On-Going".
Anonymous , add one more condition
new column =
var _1 = AverageX(filter(Table, not(isblank([Start Date])) && not(isblank([Finish Date])) , datediff([Start Date], [Finish date], day))
return
if([status]= "Finish,
Switch(True() ,not(isblank([Start Date])) , [Start Date],
isblank([Start Date]) && not(isblank([Finish Date])), [Finish Date] - _1,
blank()) , blank() )