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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
fmerieux
Frequent Visitor

Performance difference: Table.TransformColumns with function or New step after all data developped

Hello everyone,

 

This is just about personal curiosity and understanding 😀

 

I've created some steps where a function is needed to iterate through grouped rows in order to apply steps for each grouped rows 

 

Step 1 : Group the rows and aggregate with "All rows" column
#"GroupRows" = Table.Group(Source, {"Field1", "Field2"}, {{"All", each _, type table }})

Step 2: Create custom function

  #"CreateFunction" = (#"Tbl" as table) as table=>

let...

in...

 

Step 3: Apply custom function to the "All rows" field

#"ApplyFunction " = Table.TransformColumns( #"GroupRows",{"All", each #"! Create custom Function"(_)})

 

 

My question is: 

Let's say I'd like to add a Table.SelectRows(...)  step

 

Is there a big performance difference between

  • adding the step within the Step2 within custom function
  • adding the step later on once all data are developped

 

Thanks for reading this and all possible answers 🙂

 

Have a great day

 

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @fmerieux ;

Is your problem solved?  If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft
Community Support
Community Support

Hi, @fmerieux ;

Avoid calculated columns if you can. They're often not necessary and just end up bloating your model.

You could try to Create a new measure...

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community


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

lbendlin
Super User
Super User

Implement two queries with the respective steps

Run Query Diagnostics on the last step of each query

Compare the query plans.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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 Kudoed Authors