Forum Discussion
undefined
- Anonymous4 years ago
Hi YasserGaber ,
If there are no consecutive null values, try this calculated column.
Column = VAR _value = 'Table'[Value] VAR _avg = AVERAGEX ( FILTER ( 'Table', 'Table'[Index] >= EARLIER ( 'Table'[Index] ) - 1 && 'Table'[Index] <= EARLIER ( 'Table'[Index] ) + 1 ), 'Table'[Value] ) VAR _result = IF ( 'Table'[Value] <> BLANK (), 'Table'[Value], _avg ) RETURN _resultAttached PBIX file for reference.
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi YasserGaber ,
If there are no consecutive null values, try this calculated column.
Column =
VAR _value = 'Table'[Value]
VAR _avg =
AVERAGEX (
FILTER (
'Table',
'Table'[Index]
>= EARLIER ( 'Table'[Index] ) - 1
&& 'Table'[Index]
<= EARLIER ( 'Table'[Index] ) + 1
),
'Table'[Value]
)
VAR _result =
IF ( 'Table'[Value] <> BLANK (), 'Table'[Value], _avg )
RETURN
_result
Attached PBIX file for reference.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data