Forum Discussion
Problem with Row context
- 6 years ago
Good to hear. What I learned from this is that only the first expression of the Calculate() is impacted by the context transition. That was not clear to me before.
You didn't show how you changed it. What I am trying to point out is that the moment you use CALCULATE(), SELECTEDVALUE takes on a new meaning, one that you might not intend.
https://www.sqlbi.com/articles/context-transition-and-filters-in-calculate/
This is the measure that I have
- pcavacas6 years agoHelper I
I created a simple PBIX example that shows my problem located here
https://oceanspray-my.sharepoint.com/:u:/p/pcavacas/ESwZvaxMNz1Kq0EjUI9m8ocBnLrTIIq1fy4egxA8yoYrOA?e=04oTLe - lbendlin6 years agoSuper User
Is the missing relationship between the tables intentional? In that case we could use TREATAS().
Please also consider this article.
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
- pcavacas6 years agoHelper I
Yes the structure of the sample is not an optimised solution, but it is a simple representation that has the same affect as my more complex full solution..
- pcavacas6 years agoHelper I
I got this to work by removing the SelectedValue in the SumX and using the fields directly.
- lbendlin6 years agoSuper User
Good to hear. What I learned from this is that only the first expression of the Calculate() is impacted by the context transition. That was not clear to me before.