Forum Discussion
Enable visual interaction without relationship
Hello dear members.
I need your help.
I have a matrix and a bar chart. The matrix and the bar chart uses the same measure in the values but in the rows they use different fields. In the matrix I have added accounts and in the bar chart products. There isn't an active relationship between the two tables( it can't be created) so when I click on a bar the mayrix remains the same. I need the bar chart and the matrix to interact.
Is there any way to achieve that with a measure?
Hi Dimitris_Kats ,
In your scenario, the best option would be to implement this using the calculation group, rather than using the USERELATIONSHIP.
The effect is shown below.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
10 Replies
- mark_endicottSuper User
Dimitris_Kats - You can perhaps make use of TREATAS or INTERSECT in a measure to create a virtual relationship.
Review this article and see if it works: https://www.sqlbi.com/articles/physical-and-virtual-relationships-in-dax/
If this helps, please mark it as a solution.
- Dimitris_KatsHelper V
Thank you so much mark_endicott I have already tried the inactive relationship and the treatas without the desired results 😔
- Dimitris_KatsHelper V
So I was able to make progress after all by using the " USERELATIONSHIP" . I created one active and one inactive relationship with the table and I was able to display the data on the bar chart. So when the first level of the category is being filtered I use the active relationship and when the second level of the category is being filtered I display the data based on the inactive relationship.
The only problem now is that the second level of category in the bar chart can cross filter the other visuals. I suppose this is due to the inactive relationship. Is there any way to fix this??
- Dimitris_KatsHelper V
- xifeng_LHi.
I have used your previous demo file to create a sample file to demonstrate my problem. In order to enable the interaction between the bar chart and the matrix I have created one active and one inactive relationship.As you can see in the file, if a brand is selected in the slicer, the bar chart displays the measure by model. When users click on a specific bar in the chart, the matrix is filtered accordingly(because of the active relationship). However, when no brand is selected in the slicer, the bar chart cannot filter the table. Specifically, when a bar is selected, the matrix displays blanks instead.
Without Selection:
With selection:
Please find the file in the following link:https://drive.google.com/file/d/1nUQge8HWa5dYFRFt_P65cIiyxKQXNR8p/view?usp=sharing
Thank you so much for your valuable help!!!- xifeng_LSuper User
Hi Dimitris_Kats ,
In your scenario, the best option would be to implement this using the calculation group, rather than using the USERELATIONSHIP.
The effect is shown below.
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
- Dimitris_KatsHelper V
Thank you so much. This has worked perfectly!!!
Is it possible to explaine me why the calculation Group has worked and what was the problem with the inactive relationship?
Thank you so much again!!!
- xifeng_LHi.