Previous month value if current month value is blank

Hi, I want to show the average price for the month, and if there are no prices, then it should show the average price of the previous month. What would be the best practice to achieve this?

image

PriceList DNA.pbix (107.9 KB)