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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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