Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
27 | |
26 | |
22 | |
12 | |
10 |
User | Count |
---|---|
26 | |
25 | |
22 | |
18 | |
13 |