Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi All,
I am struggling with a context transition problem.
I have preapared a simple data model to illustrate it.
I have:
- 1 transaction table with values that I need to aggregate (in this table there are transactions id with duplicates)
- 1 date table with an active relationship (date_1) and an inactive relationship (date_2)
- 1 table with a list of values (from 1 to 500+) which will be used as an axis (an inactive relationship has been created between the transaction table and this table.
I want to count the number of occurences (values in the transcation table) and display the number of occurences on a bar chart using the 3rd table as axis.
The challenge is:
1/ to ignore duplicates
2/ to apply the right filter context (date_2 instead of date_1)
The problem I have is that my measure first applies a filter on date_1 and only then on date_2.
In the attached pbix, my measure is the following ("Count value (w/o dupliactes & based on date_2)". With the current filters on the report page the result should be 7 and not 6. One of the transactions is not taken into account because the "date_1" of this transcation is <> 2020.
How can I remove the filter context on date_1 and apply it on date_2 only? Please take a look at the attached file because the measure also use TREATAS to link the values from the transcation table and the axis table which makes the scenario a bit more complex.
Thanks in advance for your help.
Solved! Go to Solution.
Hi @lbendlin , you are right. I have found the answer myself and updated the pbix. I just didn't had time to update the post here. 😉
Now I am trying to develop the logic further and get the cumulated value (using ALLSELECTED). I have not succeeded yet, but I will post a complete answer if I mange to get the expected result. If you have any idea on how to achieve this it will be welcome.
Your pbix already has the anwer?
Hi @lbendlin , you are right. I have found the answer myself and updated the pbix. I just didn't had time to update the post here. 😉
Now I am trying to develop the logic further and get the cumulated value (using ALLSELECTED). I have not succeeded yet, but I will post a complete answer if I mange to get the expected result. If you have any idea on how to achieve this it will be welcome.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.