Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a table which matches companies based on similarity. It is constructed so that for each company, it will match against every other company, and give those matches a rank. eg.
Let's call this table 'Company Comparison'
Company | Matched Company | Rank |
A | C | 1 |
A | B | 2 |
A | D | 3 |
B | D | 1 |
B | C | 2 |
etc. |
I then have a number of measures that, when the data is filtered on 'Company' eg. to Company A, will calculate the metric for the company matched with A at Rank 1 - so in the example above would calculate the metric for company C. The measures use the format:
Solved! Go to Solution.
@Anonymous - The short form is:
Measure =
SWITCH(SELECTEDVALUE('DisconnectedTable'[Column]),
"Option 1", <calculation one way>,
"Option 2", <calculation a different way>
)
@Anonymous - Seems like an implementation of the Disconnected Table Trick. Basically, use a disconnected table as a slicer and then based on the selection in that slicer, perform calculations differently.
Here is one example - Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick/ba-p/279563
@Anonymous - The short form is:
Measure =
SWITCH(SELECTEDVALUE('DisconnectedTable'[Column]),
"Option 1", <calculation one way>,
"Option 2", <calculation a different way>
)
@Anonymous , not very clear. See if what if the parameter can help you
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
Thanks @amitchandak, the rank in this case is static (calculated outside powerbi and then brought in). So I guess what I'm trying to get at is if I have measures that filter on a column like that, but I'd also like a user to be able to override that and instead choose which rows they personally want to filter on, how do I code that into a measure? That it should let the user override it's filter if they want to?
User | Count |
---|---|
102 | |
91 | |
87 | |
79 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
75 | |
64 |