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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mathieu_thelot
Frequent Visitor

distinct values of two rows

I want to create a column with Distinct value of row_1 and row_2

 

row_1 is in a table_1, and row_2 in an other table_2

 

so to have unique value 

 

var_1 = distinct( table_1[row_1])

var_2 = distinct( table_2[row_2])

 

Is there a way to create a row_uniq of this 2 tables ?

something like var = distinct( table_1[row_1]) && distinct( table_2[row_2])

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @mathieu_thelot,

 

In your scenario, if the table contains var_1 and the table contain var_2 are related, you can combine those two columns from different tables with Related() function. Please refer to this article: Tutorial: Create calculated columns in Power BI Desktop.

 

But if distinct value from var_1 and var_2 contain the same value (eg: var_1 returns "a,b,c", and var_2 returns "a,d,e"), when you concatenate them, they will return "a a", is that what you want? In your scenario, I would suggest you merge those two tables table_1 and table_2 use Append Queries in Query Editor, then row_1 and row_2 will stay in the same column(eg:"a,b,c,a,d,e"). You can use Distinct() function to return unique values from this new column(eg:"a,b,c,d,e").

 

If you have nay question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CheenuSing
Community Champion
Community Champion

@mathieu_thelot

 

Can you share some saample screen shot or dataset 

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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