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
LandonDodge
Employee
Employee

multiply single value across several rows of table to create a new table

I would like to create a new table by multiplying a single value across specific (but not all) columns of an existing table.  I would like the single value to be stored as a measure or somesuch so that by simply changing the value to a new value, the calculated table updates.  I am hoping I can do this across an entire table at once with a single formula or statement instead of having to do it "manually" for each column.  It's also important that it work across selected rows of the entire table, with the result being a new table with the new values.  I've taken half a day searching for this across the web and trying out approaches that sounded similar, as I would think this would be a common scenario (it would take me about five minutes to do this in Excel), but I've come up empty.  I would appreciate help, or an indication that it can't be done in Power BI desktop if that is the case.  Thank you.

1 ACCEPTED SOLUTION

Hi @LandonDodge,

 

You can create a calculated table below: 

 

Table = SELECTCOLUMNS('Table1',"Column1",'Table1'[Column1]*4,"Column2",'Table1'[Column2]*4,"Column3",Table1[Column3]*4)

 

q4.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
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

4 REPLIES 4
MFelix
Super User
Super User

Hi @LandonDodge,

 

I believe you can achieve this with the what if analisys and a measure, however without much more information is difficult to help.

Do you have any specific attribute that determine what rows / columns to be multiplied?

 

can you give an example?

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks for your reply, MFelix.  Unfortunately I don't have a specific attribute for which columns to include, so to simplify, let's say I simply want to multiply all the columns in a given table by a single value, specified in a measure or by some other means that I can easily change (referred to as "Multiplier" below), that results in a new table with the calculated results.  Example below:

 

Multiplying tables.PNG

 

I appreciate whatever help you can provide.  Thank you.

 

 

Hi @LandonDodge,

 

You can create a calculated table below: 

 

Table = SELECTCOLUMNS('Table1',"Column1",'Table1'[Column1]*4,"Column2",'Table1'[Column2]*4,"Column3",Table1[Column3]*4)

 

q4.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Qiuyun Yu, thank you very much for your reply and answer.  It works exactly as I was looking for.  I really appreciate your help!!

 

Best,

LandonDodge

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.