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

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

Reply
nfuids
New Member

When should I favor DAX over PowerQuery for performance

Hi guys,

 

I have this query that does some basics steps such as loading data from a web api, select a few columns, rename them, then I create a column concatening 2 columns together, then I load a second set of data from another web api, I filter that second set of data before I do a Table.Join on them. This takes the longest time of all steps, there is less that 1000 rows in the first table and 100 for the second table..

 

My question is what's best done in DAX instead of PowerQuery? Like my concatenate, should I wait and do it in DAX? 

 

I'm not looking for a specific answer for my query but more of a general guideline as to when faver PowerQuery or Dax?

 

2 REPLIES 2
KNP
Super User
Super User

If you're looking for generalisations.

Data modelling in PQ. (generate your dimensions facts etc., add any required key columns/other transformations) [aiming for star schema here]

Analysis in DAX (measures, aggregated tables [maybe], avoid calculated columns in DAX)

but...

"It depends"

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @nfuids - the answer is "It Depends".  Sometimes it is possible to leave the Join out of Power Query.  This is possible because the DAX/Data Model can have the relationship.  But this only works when you have a Fact Table and Dimension Table coming from the API sources.

If you need to JOIN the tables to form one fact table, you may want to consider using the Table.Buffer function on both tables before the JOIN.  This would mean that both table are loaded to memory before the join and stop Power Query thinking that it can join this in parallel.

let
   #"Source A" = Table.Buffer( #"API Call 1"),
   #"Source B" = Table.Buffer( #"API Call 2"),
   #"Join Step" = Table.Join( #"Source A", #"Source B", "Key Column")
in
   #"Join Step"

 

In general, I try to avoid aggregates and calculations in Power Query.  Leave this for the DAX.

 

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!

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