Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I am having a hard time wrapping my head around the best way to merge this data and looking for a best practice approach.
Here is a sample of some raw data in an imported CSV. There are some common columns and uncommon ones.
CUSTOMER | CITY | STATE | INV | WEIGHT |
Customer A | HOUSTON | TX | 3 | 7 |
Customer A | HOUSTON | TX | 5 | 5 |
Customer B | DALLAS | TX | 10 | 23 |
Customer B | DALLAS | TX | 15 | 32 |
I am trying to consolidate into a single summed-up table summing the value like you would in excel SUMIF. I have tried making a distinct list of the customer names but It keeps saying I have a many to many relationship and unable to sum the values.
What is the best way to take the above imported data and end up with a consolidated table like the below that I can report on?
CUSTOMER | CITY | STATE | INV | WEIGHT |
Customer A | HOUSTON | TX | 8 | 12 |
Customer B | DALLAS | TX | 25 | 55 |
Solved! Go to Solution.
Considering Grouping the rows in PowerQuery.
= Table.Group(#"Changed Type", {"CUSTOMER", "CITY", "STATE"}, {{"INV", each List.Sum([INV]), type nullable number}, {"WEIGHT", each List.Sum([WEIGHT]), type nullable number}})
Considering Grouping the rows in PowerQuery.
= Table.Group(#"Changed Type", {"CUSTOMER", "CITY", "STATE"}, {{"INV", each List.Sum([INV]), type nullable number}, {"WEIGHT", each List.Sum([WEIGHT]), type nullable number}})
I have never done that before. Thank you! Would you still do that if it were a much larger table to clean up?
Hi @PeeWhy
if it were a much larger table, you can still use this way to clean up.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |