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
Anonymous
Not applicable

How to multiply all columns of one table with only one column from other

@Anonymous

 

Hello everyone,

 

I have table A with columns like Feb 19, Mar 19, Apr 19,........, Dec 22, Jan 23. And I have another table B with a column called as Ansatz. Now I want to multiply all months column from table A with Ansatz column from table B. So can anyone please tell me how can I multiply columns from different tables? I want to write a Power Query in Power BI Desktop. Thank you in advance. If my question is not clear then please write me then I will again try to explain it.

 

Thank you in advance

Riya 

1 ACCEPTED SOLUTION


@Anonymous wrote:

@Anonymous 

 

Thank you for your reply. But the column from table B does not have same values. It has different values so if I unpivot the columns from table A then it cannot work.

 


Yes it can, you would only unpivot the month columns. Then you should be able to join the two tables based on the resource_name and look up the relevant amount to multiply by.

 

If you still do not think this will work can you post some example data as per https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 so that we can see an example of the sort of data that you are dealing with?

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Without lookup, it worked. Thank you 🙂

Anonymous
Not applicable

@Anonymous 

 

Thank you for your reply. But the column from table B does not have same values. It has different values so if I unpivot the columns from table A then it cannot work. But is there a way to do a conditional multiplication? For example, if Resource_Name from table A is ABC, then it should be multiplied with 0.05? 

 

Thank you.


@Anonymous wrote:

@Anonymous 

 

Thank you for your reply. But the column from table B does not have same values. It has different values so if I unpivot the columns from table A then it cannot work.

 


Yes it can, you would only unpivot the month columns. Then you should be able to join the two tables based on the resource_name and look up the relevant amount to multiply by.

 

If you still do not think this will work can you post some example data as per https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 so that we can see an example of the sort of data that you are dealing with?

d_gosbell
Super User
Super User

The simplest approach is to unpivot table A so that it becomes two columns, a month and a value column, then you can simply multiply the value column by the value from your other table

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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
Top Kudoed Authors