Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
My understanding was that Distinct Union would remove duplicate rows, however I keep getting duplicate rows. Was hoping there might be something simple that someone could point out that is incorrect. Thanks for any tips!
In the below example, I'll get the following row twice:
United States, Hardware, $500
DEFINE
VAR Table1=
SUMMARIZECOLUMNS(
'Sales Structure'[SLS LVL 1],
'Product Table'[Product 1],
KEEPFILTERS( TREATAS( {"United States"}, 'Sales Structure'[SLS LVL 1] )),
"Orders Revenue", [Orders Revenue]
)
VAR Table2=
SUMMARIZECOLUMNS(
'Sales Structure'[SLS LVL 1],
'Product Table'[Product 1],
KEEPFILTERS( TREATAS( {"Hardware"}, 'Product Table'[Product 1] )),
"Orders Revenue", [Orders Revenue]
)
VAR UnionTable = Union(Table1,Table2)
VAR Output = Distinct(UnionTable)
Evaluate
Output
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
18 | |
15 | |
7 | |
5 |