Forum Discussion
Gap filler - previous value
Hello all,
i've two connected table. One with the price development of some articels and one for the time period columns.
But there isn't always a value for any column. So the goal is, if there isn't a value for column x, check if there is one in column x-1 and take this one:
My approach:
Hi Chris_23 ,
Please try the following formula:
Measure = IF ( [DUC] = BLANK (), CALCULATE ( [DUC], DATEADD ( Lastmth[Date], -1, MONTH ) ), [DUC] )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- lbendlin
Super User
This is the "penultimate value" pattern.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - v-kkf-msft
Community Support
Hi Chris_23 ,
Please try the following formula:
Measure = IF ( [DUC] = BLANK (), CALCULATE ( [DUC], DATEADD ( Lastmth[Date], -1, MONTH ) ), [DUC] )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.