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
LaurentZ
Helper I
Helper I

Merge Query with Allocation by using the same selection of column from Left table

Hi,

 

I've a DB which is very detailed (breakdown by Category, Customers and so many others).

I've fixed Costs on Total Category.

If I do a simple merge query, then I will have the same fixed cost on all lines, this is not what I want...

In Excel I would have managed it via a ratio [Turnover of the line / Sumifs(total Turnover, same Category)] * fixed cost. I must precise that I'm in Excel Power Query Only (not power BI) so I can't do it via DAX.

 

Is there any way to :

  1. merge query with direct allocation of the cost based on criteria or
  2. add a column to do what a sumifs would have done or
  3. no other way than doing a "group by" and merge queries to have the total ?

 

Thank you in advance for your help.

 

Laurent

1 ACCEPTED SOLUTION
Jimmy801
Community Champion
Community Champion

Hello @LaurentZ 

 

to use Table.Group and Table.Join/NestedJoin is just fine and for sure the reccomended approach to take.

What should be wrong about that?

 

Jimmy

View solution in original post

2 REPLIES 2
Jimmy801
Community Champion
Community Champion

Hello @LaurentZ 

 

to use Table.Group and Table.Join/NestedJoin is just fine and for sure the reccomended approach to take.

What should be wrong about that?

 

Jimmy

Hi @Jimmy801,

First, thank you for your answer.

 

Well that's not a wrong way to do it, I was just wondering if there is another way to do it.

Ok, then I go with a groupby and merge.

 

Regards,

Laurent

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.