Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |