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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Related

Hi,

 

I have two tables but they aren't in a direct relation (just an inactive). Is there a possibility to get the Related Function into action even without direct relation?
Thanks a lot. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @amitchandak 

The Relationship meets at another table. But I figured out there was another table i could make a relation with (a date table) and after that, i used the relatedtable function with sumx and that worked out with a charm. But good to know: userelationship.

Hi @PaulDBrown 

Thanks for the reply. Since I could use the relatedtable function with sumx, everything works fine. But that's a great way with a virtual table.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi  @Anonymous ,

According to your description, I created two unrelated tables:

v-yangliu-msft_0-1611192484597.png

Here are the steps you can follow:

1. Create calculated column. Use the relatedtable function in table2 to calculate the amount in the table

Column = SUMX(RELATEDTABLE('Table'),'Table'[amount])

2. Result

v-yangliu-msft_1-1611192484598.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @amitchandak 

The Relationship meets at another table. But I figured out there was another table i could make a relation with (a date table) and after that, i used the relatedtable function with sumx and that worked out with a charm. But good to know: userelationship.

Hi @PaulDBrown 

Thanks for the reply. Since I could use the relatedtable function with sumx, everything works fine. But that's a great way with a virtual table.

PaulDBrown
Community Champion
Community Champion

@Anonymous 

You can create a virtual relaionship bewteen two unrelated tables using the TREATAS function as the filter expressions. For example, say you had  two unrelated tables:
Table 1

Country ID Forecast

US

100
Japan 110
UK 120
Germany 130

 

Table 2

Country ID Sales

Japan

95
Germany 75
US 105
UK 95

 

You could create the following measures:

1)

Sum of sales = SUM(Table2[Sales])

2) 

Sum of Forecast = SUM(Table1[Forecast])

3) 

Sales (TREATAS) = CALCULATE([Sum of Sales], 
          TREATAS(VALUES(Table1[Country ID]), Table2[Country ID))


Then create a visual using the field Table1[Country ID] and the [Sum of Forecast] and [Sales (TREATAS)] and both would be filtered by the Country ID.

Make sense?

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






amitchandak
Super User
Super User

@Anonymous , Why the relationship is inactive?

You can activate it using userelationship  https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in-power-bi

related need active relation

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.