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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
gelsonwj
Helper I
Helper I

division between 2 columns of different tables based on the same value of different columns between

I have the table1

gelsonwj_2-1682020378361.png

 

and the table2

gelsonwj_3-1682020391724.png

 

I would like to make a division between the column "Valor" of table2 by the column "suficiente" only if the values ​​of the columns "Atributo" of table2 and "elementos" of table 1 are equal.

here is an example of what i expect as a result:

gelsonwj_4-1682021080414.png

 





1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @gelsonwj 

Not sure if i fully get your poit. you may try to add a calculated column in Table2 like:

Column = 
VAR _value =
LOOKUPVALUE(
    Table1[suficiente],
    Table1[elementos],
    Table2[Atributo]
)
RETURN
DIVIDE([Valor], _value)

 

it worked like:

FreemanZ_0-1682218767692.png

View solution in original post

1 REPLY 1
FreemanZ
Super User
Super User

hi @gelsonwj 

Not sure if i fully get your poit. you may try to add a calculated column in Table2 like:

Column = 
VAR _value =
LOOKUPVALUE(
    Table1[suficiente],
    Table1[elementos],
    Table2[Atributo]
)
RETURN
DIVIDE([Valor], _value)

 

it worked like:

FreemanZ_0-1682218767692.png

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.