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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Pbiuserr
Post Prodigy
Post Prodigy

calculations with bridge table

Hello

I have bridge table as on screenshot. I try to make calculated column in main table which includes DIVIDE (table1[column], table2[column],0) and measure Measure = DIVIDE (SUM(Table1[Column]), SUM(Table2[Column]),0 )

 

Is that possible?

Capture.PNG

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Pbiuserr ,

I created some data:

Table1:

vyangliumsft_0-1655967919893.png

Table2:

vyangliumsft_1-1655967919894.png

Table3:

vyangliumsft_2-1655967919894.png

There can only be one active relationship in the data model between two tables, even if you add another relationship, it is inactive

If you want to activate this inactive relationship, you must close another active relationship. Active relationships are represented by solid lines, and inactive relationships are represented by dashed lines.

vyangliumsft_3-1655967919897.png

Here are the steps you can follow:

1. Create calculated column.

Column =
DIVIDE(
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[date]=
MAXX(FILTER(ALL('Table3'),'Table3'[Group]=EARLIER('Table2'[Group])),[date]))),
'Table2'[Amount2])

vyangliumsft_4-1655967919898.png

2. Create measure.

Measure =
DIVIDE(
SUM('Table'[Amount]),SUM('Table2'[Amount2]))

vyangliumsft_5-1655967919898.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

View solution in original post

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @Pbiuserr ,

I created some data:

Table1:

vyangliumsft_0-1655967919893.png

Table2:

vyangliumsft_1-1655967919894.png

Table3:

vyangliumsft_2-1655967919894.png

There can only be one active relationship in the data model between two tables, even if you add another relationship, it is inactive

If you want to activate this inactive relationship, you must close another active relationship. Active relationships are represented by solid lines, and inactive relationships are represented by dashed lines.

vyangliumsft_3-1655967919897.png

Here are the steps you can follow:

1. Create calculated column.

Column =
DIVIDE(
CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[date]=
MAXX(FILTER(ALL('Table3'),'Table3'[Group]=EARLIER('Table2'[Group])),[date]))),
'Table2'[Amount2])

vyangliumsft_4-1655967919898.png

2. Create measure.

Measure =
DIVIDE(
SUM('Table'[Amount]),SUM('Table2'[Amount2]))

vyangliumsft_5-1655967919898.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

amitchandak
Super User
Super User

@Pbiuserr , Table1 and table2 is not having any common table/dimension as per the diagram shared. You can we this measure only at grand total level

DIVIDE (SUM(Table1[Column]), SUM(Table2[Column]),0 )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Is there any way to calculate it as column in the main table (for example create a bridge between table 1 and table 2) ?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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