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

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.

Reply
dk15
Frequent Visitor

How to show data with filters from active and inactive relationship

dk15_0-1651798723060.png


I'm trying to create a bar chart from data in table 3 and group it by the date in table 1. I want the data in table 3 to include the data from the inactive relationship between table 3 and table 2 and then again, group by the date in table 1. I don't want any data that comes from the relationship with table 4.

I know I could achieve this by smashing some tables together in power query, but I'm curious if there is better way I can do this.

5 REPLIES 5
chrisyan_manalu
Helper II
Helper II

Actually you can dax using "USERELATIONSHIP" to be used in a specific calculation as the one that exists between columnName1 and columnName2

I've seen the USERELATIONSHIP function, but what I've read online and my own experiments don't seem to be doing what I want

jsaunders_zero9
Responsive Resident
Responsive Resident

Got some sample data?

Here is some example data:

dk15_0-1652119472682.png

 

From this example data, I would want a graph with the id's 4, 5 and 6 from table 3, since they both eventually connect back to table 1. id 7 connects to table 2 and then table 4, which I would want to exclude

HI @dk15,

Your snapshot is too small to get some useful information. Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

In addition, if you want accurate calculations based on specific relationships. You can create an unconnected table and use its field as axis, then you can write a measure formula to lookup and calculation results from raw tables based on the current row context.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.