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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
varutvu
Regular Visitor

Create multiple custom columns in power query in single step

Hi,

 

I have a data set of 20 fields, where I need to create another 10 columns with formla like below

 

Field 21 = Field 5 * Field 6

Field 22 = Field 5 * Field 7

FIeld 23 = Field 5 * Field 8

...

 

Is there a quick way to do this in Power Query without manually adding 10 steps?

 

Thank you for your help!

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi , @varutvu 

Each step of your operation in the "Transform Data" can be seen as writing an m_query statement in "Advanced Editor".

86.png

So you can also directly implement what you want in code in addition to using interface button “Custom Column”.

As shown in the screenshoot  below, you only need to  copy and modify a few lines of code again.

87.png

 Then you will  get the desired result as below:

89.png

 

Best Regards,
Community Support Team _ Eason
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

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi , @varutvu 

Each step of your operation in the "Transform Data" can be seen as writing an m_query statement in "Advanced Editor".

86.png

So you can also directly implement what you want in code in addition to using interface button “Custom Column”.

As shown in the screenshoot  below, you only need to  copy and modify a few lines of code again.

87.png

 Then you will  get the desired result as below:

89.png

 

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

 

 

 

amitchandak
Super User
Super User

@varutvu , You can add column-like, faster way? Maybe just add to source script

Field 21 = [Field 5] * [Field 6]

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
Greg_Deckler
Community Champion
Community Champion

@varutvu - Huh, that's a good one. I'm not aware of a way but if anyone knows of something fancy, it's @ImkeF 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.