Forum Discussion
USERELATIONSHIP when certain value is selected
- 4 years ago
You could write a measure with two variables - one with USERELATIONSHIP and one without, and then use IF with SELECTEDVALUE on your slicer column to decide which to return.
Pat
Thanks, your solution moved me forward but I still need some additional guidance. This is how my measure worked out:
Measure =
var _similar = CALCULATE(DISTINCTCOUNT('PERSON ID'[id]), USERELATIONSHIP(PERSON ID[id], Company2[Id]))
var _all = CALCULATE(DISTINCTCOUNT('PERSON ID[id])
RETURN
CALCULATE(IF(SELECTEDVALUE(Field of Business[key]) = "Similar", _similar, _all))
The problem is, I only get the calculated amount of similar id's but it is not possible to use them as row values. In the Person ID table I have additional information, such as gender. I'd like to visualize how id's within each and every selection are divided into men and women.
When I select any other field than "Similar", the column chart works perfectly. When selecting "Similar", the visualization is turning all white.
Do you have an idea how this could be fixed?
- Anonymous4 years agoNot applicable
Does anybody have an idea how to fix this? 🙂