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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
avi081265
Helper III
Helper III

How to combine two columns as one column with unique value

Hello,

 

I have two columns i.e. ProductionPlant and DevelopmentPlant, I want to combine both columns as one column with unique values.

 

What is best and eficient way to do this?

Regards

Avian

6 REPLIES 6
mussaenda
Super User
Super User

Hi @avi081265 ,

 

please provide a sample data that we can copy and show your expected output

avi081265
Helper III
Helper III

Hello,

 

I have so many columns on original table, I tried to merger both the tables, datas are duplicatiing. because it is whenever First column has value thne second column is empty and vice versa.

 

Is there way we can achieve thru query?

 

Avian

SamInogic
Super User
Super User

Hi,

 

We are a bit unclear about your question about Unique values,

 

However, as per our understanding,

 

You can append Query in Power Query Editor, Please follow the steps below,

 

1. Duplicate the Required Table,
2. Remove the first column and rename the second column in the original table,
3. Remove the Second column and rename the first column in the Duplicate table,
4. Navigate to the Append Queries,
5. Choose the table to Append

 

In the below sample table, we are looking to combine Both date fields in one as Date,

Please refer the below screenshots,

SamInogic_0-1689855052936.png

After Updating the tables,

SamInogic_1-1689855086797.png

 

Navigate to the Append as new, (Top - Right)

SamInogic_2-1689855127961.png

After Append the Tables,

 

SamInogic_3-1689855198335.png

Let us know if this is an expected result for you or if not then could you explain more about your query with sample data?

 

Thanks!

Inogic Professional Services Division

Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

Drop an email at crm@inogic.com

Services:  http://www.inogic.com/services/

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

View solution in original post

 

 

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Drop an email at crm@inogic.com
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

Hello

 

I tried as you suggested unfortunately I am getting duplicate records.

 

I have so many columns, I implemented as you suggested, first column showing value and second column showing null, Second column showing values, first column is showing null. And because of this records are duplication. 

 

Is there any way?

 

Avian

Hello

 

Can anyone please help on my above question

 

Avian

Hi @avi081265 ,

 

You can use the DISTINCT DAX function in Power BI.

 

To retain unique cells, you'll need to create a new table. Refer to the DAX expression provided below:

 

New Table = DISTINCT( UNION( ALL('Sample Table'[Fruits]), ALL('Sample Table'[Another Fruits]) ) )

 

If this doesn't solve the issue, please share the current and expected output with us, ensuring sensitive data is obscured.

Thanks!

 

Inogic Professional Services Division

Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!

Drop an email at crm@inogic.com

Services:  http://www.inogic.com/services/

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Drop an email at crm@inogic.com
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors