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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
TexasStone
Frequent Visitor

Distinct Union Not Removing Duplicates

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

 

 

1 REPLY 1
lbendlin
Super User
Super User

cannot reproduce

 

lbendlin_0-1696556699161.png

 

see attached.

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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