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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to get distinct values from each column

Hi Community,

 

Please help me in fixing this issue . I have created a table with 3 different columns and want to get distinct values from each column . I am getting duplicates with the below query . Please check and let me know on how to get distinct values . 

 

Table =

Var a = SELECTCOLUMNS('Product & Apps Incident Query',"Product ID",('Product & Apps Incident Query'[Product_Id]),"Product Name",('Product & Apps Incident Query'[product_name]),"Support Group",('Product & Apps Incident Query'[Assigned_Group]))

 

Var b = SELECTCOLUMNS('Product & Apps WO Data',"Product ID",'Product & Apps WO Data'[Product_Id],"Product Name",('Product & Apps WO Data'[Product_Name__2_]),"Support Group",('Product & Apps WO Data'[ASGRP]))

 

return UNION(a,b)

 

Thanks,

G Venkatesh

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you share some sample data and the results you expect based on this data?

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@Anonymous Maybe: return DISTINCT(UNION(a,b))



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.