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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Bratone
Helper I
Helper I

Can't multiply 2 columns from 2 different queries

Hello,

 

I have the below model and I am trying to creature a measure which for every employeed, will multiply in every day of the week the Duration from the file query "RAR" with the related target from the querry called "Dynamic Target".

 

query 1.PNG

 

The thing is that I tried doing the same but taking the target from another query and it's working, to sum it up below:

 

A  = SUMX(RAR, [Total Annotation]* RELATED(Activities[Target])) ==> WORKING
B = SUMX(RAR, [Total Annotation]* RELATED(?????) ==> Here it doesn't find the related Target in the "Dynamic Target" query.
 
Both files, "Activities" and "Dynamic Target" have the same kind of connection to the RAR query (through the "Process Name"), yet for the "Activities" one it lets me multiply with the target from there, but for the "Dynamic Target" it doesn't, can you please explain me why ?
 
Also, I tried doing the below formula as well:
 
A = SUMX('Dynamic target', [Total Annotation] * 'Dynamic target'[Target]) ==> it works, so in the "Dynamic target" query I can multiply these, but for some reason the result is doubled, so for example, instead of 50 I get 100 etc.
 
This is also how the queries look inside, if you need more info or pictures please let me know...
 
query 2.PNGquery 3.PNGquery 4.PNG
 
So as you may have guessed from the pics, the idea is to use a dynamic target which can change from one day to another or from one employee to another (the excel file for the query will have a dedicated sheet for each week of the year, with the list of days, employees etc), rather than use a general one from the Activities query.
 
Thank you very much for your help!
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Bratone , RELATED can only give one side of table data to many side, for tables directly connected

 

You can try Related table or Sumx/Maxx with your choice of condition

 

example

New column in table 2

maxx(filter(Table1, Table1[ID] = Table2[ID]), Table2[Value])

 

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Bratone
Helper I
Helper I

Thank you very much @amitchandak, it worked with relatedtable.

amitchandak
Super User
Super User

@Bratone , RELATED can only give one side of table data to many side, for tables directly connected

 

You can try Related table or Sumx/Maxx with your choice of condition

 

example

New column in table 2

maxx(filter(Table1, Table1[ID] = Table2[ID]), Table2[Value])

 

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors