It's good that you provided your solution, because I got confused just from the explanation from the post. Indeed the problem with your solution was data binding. You've mistaken the data binding for QueryDataByCustomerAndPeriod.CustomerId it should be QueryCustomersByDate.SelectedItem.Id . Also instead of using generic prpCustomer, you need to use the selected item of QueryCustomersByDate and get the relevant Id. To clarify everything see the screenshots below. Hope this solves your problem.
A note to remember - check carefully your data biding in the View-Model - what links to what.
Problem in QueryDataByCustomerAndPeriod.CustomerId
Correct the binding in QueryDataByCustomerAndPeriod.CustomerId