Great to hear you got it working.
Just as general food for thought - in dealing with granularity mismatches in my actual vs. budgets analyses, I had previously relied heavily on TREATAS and fairly complex dynamic DAX allocation approaches to address the many-to-many issues. However, the Power Query-based allocation down to the lowest granularity level that @haroonali1000 built Problem of the Week #4 around has been an absolute revelation for me, and has changed the way my team and I do budgeting analyses in Power BI. Not difficult to implement within PQ, and dramatically simplifies the data model and the associated DAX. Your case is a bit different, since the allocation is not time-based, but product/category-based, but I think the general technique could be adapted.
Worth at least taking a look at, I think.
- Brian