Direct Query DAX question

I’m currently using direct query to bring my dataset in powerbi. I’m trying to create a measure in DAX such that the calculation is always done at a summarized view of the customer product level given a date context.

Here is an example. I have a sales table as noted below
Sales%20Table

If the user selects year 2020 and month 1, it computes the answer which is the sum of the (change in sales at a customer product level / Total prior year Sales). Hence regardless of any dimension attributes or selecting sales rep, this sum is always computed at the customer product level. In the case below the answer is -0.32203.

Answer

Can some help with this? See sample dataset attached. I believe the summarize dax function is not compatible with direct query. Hence looking for some other suggestion on measures.
PowerBI question.xlsx (12.0 KB)

I recommend adding a pbix file here with the whole scenario laid out. That’s likely going to assist those in the forum working on this problem.

Currently I’m trying to imagine everything that could be at play here but it isn’t that easy.

Thanks
Sam

Hi @avalon.ds, we’ve noticed that no response has been received from you since January 28, 2020. We just want to check if you still need further help with this post? In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved. 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 checkbox. Thanks!