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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
WESTi
Helper I
Helper I

Return value from table based on measure value and x2 relationship columns

I have one table like this:

 

 

Area | Location | Value

 

and anther table like this:

 

 

Area | Location | Value | Worth

 

What I want to do is return the worth value. However, I cannot create a relationship as I need to lookup the SUM of the value from the first table. For example:

 

I may have the following data set

Area | Location | Value

AK | NZ | 10

AK | NZ | 5

AK | AU | 4

 

What I need to do is not return the worth on each row - so I don't want to look up the 10 and 5 for the NZ location, instead I want to lookup 15 (the SUM of the values). The end table I want to create would look like this - it would be a summary:

 

AK | NZ | 15 | 500

 

Does anyone have any ideas how I could achieve this?

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @WESTi,

 

In this scenario, you can first summarize your source table.

NewTable1 =
SUMMARIZE (
    'Return Value Table1',
    'Return Value Table1'[Area],
    'Return Value Table1'[Location],
    "Total Value", SUM ( 'Return Value Table1'[Value] )
)

In 'NewTable1', get the worth value from second table via LookUpValue.

Return Worth =
LOOKUPVALUE (
    'Return Value Table2'[Worth],
    'Return Value Table2'[Area], NewTable1[Area],
    'Return Value Table2'[Location], NewTable1[Location],
    'Return Value Table2'[Value], NewTable1[Total Value]
)

1.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @WESTi,

 

In this scenario, you can first summarize your source table.

NewTable1 =
SUMMARIZE (
    'Return Value Table1',
    'Return Value Table1'[Area],
    'Return Value Table1'[Location],
    "Total Value", SUM ( 'Return Value Table1'[Value] )
)

In 'NewTable1', get the worth value from second table via LookUpValue.

Return Worth =
LOOKUPVALUE (
    'Return Value Table2'[Worth],
    'Return Value Table2'[Area], NewTable1[Area],
    'Return Value Table2'[Location], NewTable1[Location],
    'Return Value Table2'[Value], NewTable1[Total Value]
)

1.PNG

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Can you clarify if you are hoping to add a calc column to 1 of your table, create a new table, or are we talking about just creating measures and visuals? 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors