Attached are two files. One is the source data which includes the issue via pivot table (just incase this might help) and the other is the PBIX file showing the dax and the visuals / issue.
Per the PBIX file I am trying to do the following:
Per week calculate the average price for each customer
Less the average price per week for all customers
and Multiply the diff by the quantity per customer (If no quantity it should be zero)
In Visual 1 each week appears to be correctly calculated but the sum of these do not equal the Total. This is a problem for me and causing me a massive headache.
E.g for customer B = -908.21-593.03-1120.09+24.55+500.63= -2096.15 not -2390.96 per the visual
Hopefully this is enough for everyone to go on and I am just making a stupid mistake. I am being chased on this so any feedback is massively appreciated. Thanks Guys
I will try Melissa’s suggestion to see if that works and come back shortly . Re the model it is not the actual file i am working with and was just a quick / basic example to illustrate my issue as not able to share confidential data. No date table or dimension tables needed as figured the more simple the easier to display the issue. Speak soon…
I have just read Greg’s post in more detail and that is the case. Thank you guys. Will spend a bit more time going over this but guess this was another hurdle to learn in the PBI world
In the matrix visual there is context coming from Week and Customer for each ‘cell’ except the Totals. There is no filtering happening on both dimensions in the Total fields, that’s where the virtual table comes in. Sam has done a lot of great videos on fixing totals and so on, just work through them - it will become more clear.