cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## DAX Measure: Sum numbers from another table

Hello Everyone,

A simple measure question, but I can't find any solution.

A short example. I have 2 tables with these values:

And this is what I want to achieve:

It seems to be logical but it doesn't work:

Measure =
VAR Table1_Sum = SUM(Table1[Count])
VAR Table2_Sum = SUM(Table2[Count])

RETURN
DIVIDE(Table1_Sum, Table2_Sum)

Or:
Measure =
VAR Table2_Sum = SUM(Table2[Count])
VAR Table2_ID = MAX(Table2[Id])

RETURN
CALCULATE(
DIVIDE(SUM(Table1[Count]), Table2_Sum),
Table1[Id] = Table2_ID
)

Super User

the simple solution is how you model this data

create a bridge table, which is the unique  list of all your id's  in both tables, and then hook up both of tables to to the unique id table.

then using your  new unique values of id's table, you place the ids from that table on the visual and the values you want from each of the tables and you should be able to compare.

if you give data in text format i can create it for you, bit it requires data in a usuable text format to copy and paste, or provide your pbix.

If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

#### New forum boards available in Real-Time Intelligence.

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

Top Solution Authors
Top Kudoed Authors