Forum Discussion
Measure not working when applied in a Matrix
They come from the following tables:
volumes
volumes
function
volumes
The measure comes from a third table, but is tied to function.
Anonymous So volumes = 'Total Volumes' table I am guessing. Is the last hierarchy level your 'Total Volumes'[Transaction Group] column or some other column in Total Volumes table? What I see in your code is that you are removing all filters except the context filter for 'Transaction Group' column. So, if that is the last hierarchy level, then you are including everything but ignoring that filter. And, you are mixing REMOVEFILTERS and ALLEXCEPT so god only knows what exactly is going on. ALLEXCEPT itself can do wild things.
Then there is your measure that is being calculated. It may have it's own CALCULATE with it's own changes to context filters and the way they could be interacting could be causing major issues.
My advice would be to see what you are just getting back if you just return the measure sans any CALCULATE and see what you are getting. I would then recommend a No CALCULATE approach using SUMMARIZE/GROUPBY and X aggregators. Go down that path and use TOCSV to troubleshoot.
If you want to know more about this approach, you can watch this:
Bottom line, you have something that is reasonably complex and I have about 1/4 of the information required to be specific with any kind of solution or advice. Telling me what tables are involved in your hierarchy without knowing which column is being used at each level of the hierarchy is simply not sufficient information. It all depends on the exact specifics of the situation (context) within the visual and it all matters a lot.