RE: filter subgrid based on another lookup related to it
Hi,
you can refer below blog on how to filter subgrid.but you have tweak a little bit from your side. The demo below was using optionset, and you are using lookup.
But please note that, this is consider unsupported because of document.getElementById has been used in this case ( in future it might breaks). So this is your call.
[View:https://mahadeomatre.blogspot.com/2015/02/dynamically-filter-form-sub-grid-to.html:750:50]
[View:https://community.dynamics.com/crm/b/nishantranaweblog/archive/2017/05/21/filter-subgrid-in-dynamics-365-with-new-form-rendering-or-turbo-form:750:50]