Previous 6 months entry

Hi all,
Need your assistance to write a statement on how to get the last record for last X months.

I.e. Current Month = Jan 2021
Previous 6 months = July 2020
** Between Aug 2020 to Dec 2020, and between Feb 2020 to May 2020, there is no record of trade price in table.

Below screenshot of desired output in yellow.

Thanks for the help!


Think you could solve this in Power Query, if there are no records in between you can add an Index and retrieve the value from the previous row.

I hope this is helpful. If you need further assistance please provide a sample PBIX.

Hi @Yatz86, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box. Thanks!