March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I'd like to group by text and result only the differences between each grouped row.
I appreciate the help!
Thanks
The result I expect:
Product | market | Part |
x1 | AX2 | ZZZ |
x2 | AX2 | GGG |
x2 | AX2 | YYY |
My DB exemple:
Product | market | Part |
x1 | AX1 | AAA |
x1 | AX1 | BBB |
x1 | AX1 | CCC |
x1 | AX1 | DDD |
x1 | AX1 | EEE |
x1 | AX1 | FFF |
x1 | AX2 | AAA |
x1 | AX2 | BBB |
x1 | AX2 | CCC |
x1 | AX2 | DDD |
x1 | AX2 | EEE |
x1 | AX2 | FFF |
x1 | AX2 | ZZZ |
x2 | AX1 | AAA |
x2 | AX1 | BBB |
x2 | AX1 | CCC |
x2 | AX1 | DDD |
x2 | AX1 | EEE |
x2 | AX1 | FFF |
x2 | AX2 | AAA |
x2 | AX2 | BBB |
x2 | AX2 | CCC |
x2 | AX2 | DDD |
x2 | AX2 | EEE |
x2 | AX2 | FFF |
x2 | AX2 | GGG |
x2 | AX2 | YYY |
Solved! Go to Solution.
Hi, @Renato_mon
let
Source = your_table,
g = Table.Group(Source, "Part", {{"Count", each Table.RowCount(_)}, {"a", each _}}),
flt = Table.SelectRows(g, each ([Count] = 1)),
z = Table.Combine(flt[a])
in
z
Hi, @Renato_mon
let
Source = your_table,
g = Table.Group(Source, "Part", {{"Count", each Table.RowCount(_)}, {"a", each _}}),
flt = Table.SelectRows(g, each ([Count] = 1)),
z = Table.Combine(flt[a])
in
z
let
Source = --- code for your source table ---,
tbl = Table.NestedJoin(Source, {"Product", "Part"}, Source, {"Product", "Part"}, "Join", JoinKind.LeftOuter),
tbl1 = Table.RemoveColumns(Table.SelectRows(tbl, each Table.RowCount([Join]) =1), {"Join"})
in
tbl1
Hi @Renato_mon
When you say "difference", please define exactly what that means.
If I would add two more lines to the table, (x1, AX2, MMM) and (x2, AX2, MMM), what would be the expected result?
What if I did not add the above two lines, but (x1, AX1, MMM) and (x2, AX2, MMM), what would be the expected result?
"Difference" means only value that are unique in all Product and Market.
In the both question, the result will be the same. The Part MMM will use in two Product/Market.
Write in the other way with 2 examples:
My DB have about 100 Products for 10 Markets, each one with about 150 Parts (15000 rows).
I hope was clear with my doubt.
Thanks!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
16 | |
13 | |
12 | |
9 |
User | Count |
---|---|
35 | |
31 | |
20 | |
19 | |
17 |