Forum Discussion
Anonymous
6 years agoNot applicable
Find the last non blank value
Hi All,
I have data like below. This is the data just for one store. If the data is not present for a particular month, I want to take the last month's data.
For example: For the Sep 2019, there is no data, hence I want to see 23.1%(Aug data).
Please help.
Thanks,
Bhavya
- Anonymous6 years ago
Hi, Anonymous
You can first create a index column and use this formula to create a calculate column.Lastmonth if blank = VAR currentIndex = Sheet1[Index] RETURN IF ( ISBLANK ( [Ave Distribution%] ), CALCULATE ( MAX ( Sheet1[Ave Distribution%] ), FILTER ( Sheet1, Sheet1[Index] = currentIndex - 1 ) ), [Ave Distribution%] )Best,
PaulIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi, Anonymous
You can first create a index column and use this formula to create a calculate column.Lastmonth if blank = VAR currentIndex = Sheet1[Index] RETURN IF ( ISBLANK ( [Ave Distribution%] ), CALCULATE ( MAX ( Sheet1[Ave Distribution%] ), FILTER ( Sheet1, Sheet1[Index] = currentIndex - 1 ) ), [Ave Distribution%] )Best,
PaulIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.