Forum Discussion
Combine two columns in the same table
- Anonymous8 years ago
MDEL,
Create a column as shown in the following screenshot.Column = IF(ISBLANK(YourTable[WHDD]),YourTable[PDD],YourTable[WHDD])
Regards,
Lydia
Not sure about your table structure, If you just want to combine these 2 columns , then you can do "Append" in Power Query Home -> Combine-> Append Queries.
If you want to do it in DAX, UNION function will help you.
If you are expecting more specilized solution then please share more details.
Thanks
Raj
Hi Rajendran
Thanks for the response,
PDD column have Dates for some records
WHDD column have Dates for different records
I want to combine both columns into one column to be able to query the Data using the combined column.
the table contains 65 columns and thousands of records.
- Anonymous8 years agoNot applicable
PDD column have Dates for some records
WHDD column have Dates for different records
I want to combine both columns into one column to be able to query the Data using the combined column.
the table contains 65 columns and thousands of records.
MDEL,
Are PDD column and WHDD column in same table? If so, what logic do you use to create the new combine column(e.g. if PDD column is greater than WHDD, then combine column should be equal to PDD column, otherwise, it should be equal to WHDD column)?
Regards,
Lydia- MDEL8 years agoRegular Visitor
Hi Lydia
I want PDD and WHDD values to be copied to the new field as it is please see example below
Name PDD WHDD NEW Field
Raw1 658 658
Raw2 5685 5685
Raw3 699 699
Raw4 257 257
Raw5 123 123
Raw6 666 666
New Field contains both values from PDD and WHDD
- Anonymous8 years agoNot applicable
MDEL,
Create a column as shown in the following screenshot.Column = IF(ISBLANK(YourTable[WHDD]),YourTable[PDD],YourTable[WHDD])
Regards,
Lydia