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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ALE_P
Regular Visitor

MULTIPLICATION BETWEEN 2 TABLES

Hello everyone,

it's the first time I write.
I have this problem:

 

I don't want to leftjoin between table1 and table2, because table1 is 3 million rows and works with direct query.

I am looking for some suggestions to create a measure or a calculated column.

Thanks in advance.

Alex. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ALE_P 

 

Create simple measure as below,

Total = SUMX(Sales,Sales[Value 1]*RELATED('Table'[Price]))
 
Capture.PNG
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar

If I resolve your problem Mark it as a solution and give kudos.
 

View solution in original post

7 REPLIES 7
ALE_P
Regular Visitor

problema.PNG

Anonymous
Not applicable

Create columnn like this in first table

 

New columnn=LOOKUPVALUE('Table 2'[price],'Table 2'[ID],'Table'[ID])
 
Then simply do multiplication of Qty and price.
 
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar

If I resolve your problem Mark it as a solution and give kudos.

syntax: LOOKUPVALUE( <result_columnName>, <search_columnName>, <search_value>)

this function returns a value, not a column, so i tried to make a measure, but the <search value> parameter is a value, and not a column.

Itried with DISTINCT, but "This function cannot be used to Return values into a cell or column".

the idea was good....

ps.: there is already a relationship many-to-one between Table1 and Table2.

Anonymous
Not applicable

Then simply create measure

New measure=sumx(table1,table1[col]*related(table2[col]))

Remember related function work for many to one and relatedtable work for one to many relationship.

Thanks
Pravin

Sorry, but as I wrote, LOOKUPVALUE it doesn't work.

Anonymous
Not applicable

Hi @ALE_P 

 

Create simple measure as below,

Total = SUMX(Sales,Sales[Value 1]*RELATED('Table'[Price]))
 
Capture.PNG
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar

If I resolve your problem Mark it as a solution and give kudos.
 
Anonymous
Not applicable

Hey

take a look at this solution . As u have a large datastet ( millions of rows that is better to create a measure and not calculated columns)

scr1.pngscr.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors