Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Dimitris_Kats
Helper V
Helper V

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?

1 ACCEPTED SOLUTION

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.

 

xifeng_L_0-1716040450357.png

 

xifeng_L_1-1716040470395.png

 

 

Demo - Interactions.pbix

 

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

 

 

View solution in original post

8 REPLIES 8
Dimitris_Kats
Helper V
Helper 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:

Dimitris_Kats_0-1716034385183.png

With selection:

Dimitris_Kats_1-1716034450999.png


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!!!

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.

 

xifeng_L_0-1716040450357.png

 

xifeng_L_1-1716040470395.png

 

 

Demo - Interactions.pbix

 

 

 

Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

 

 

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!!!

To avoid the filtering of auxiliary tables affecting the calculations of other tables, it is therefore preferable to disconnect the relationship.

 

Calculated groups are used in order to add the filtering of selected items in the bar chart to other measure, you can check the expression for calculated groups to understand this.

That makes sense. Thank you so much for the thorough explanation 😃 

Dimitris_Kats
Helper V
Helper 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?? 

mark_endicott
Responsive Resident
Responsive Resident

@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. 

Thank you so much @mark_endicott I have already tried the inactive relationship and the treatas without the desired results 😔

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Kudoed Authors