March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I need to some help, I think it should be fairly simple but for the life of me I can't find the solution. I have some not so great data which I need to find the duplicates, to do that I need to combine a number column with a data column to group by and see the duplicate items.
Number Column | Date | Ref |
0001 | 16/08/2021 | 0001 16/08/2021 |
Unfortunately I just keep getting an error message so I'm clearly doing something wrong.
Any help would be mightly appreciated.
Solved! Go to Solution.
FYI that you can Ctrl click on your number and date columns to select them both, and then choose Remove Duplicates from the ribbon under Remove Rows. To concatenate them, they both need to be type text, so you'll need something like:
= Number.ToText([Number Column]) & " " & Date.ToText([Date Column], "yyyyMMMdd")
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hope I'm understanding correctly. You are trying to make a key field you can use to remove duplicates.
If this is correct this is what I do in these situations:
Clean up the data 1st then make your key field.
Since i don't want to lose my data, I'll start of by creating duplicates of the columns I'm trying to convert into a key field and do my cleaning on those columns especially since the column merge will remove the columns being merged, this means I only lose the duplicate columns not the originals.
Here are the steps:
Choose a seperator if you want to add one and name your new column
Hope this helps.
Hope I'm understanding correctly. You are trying to make a key field you can use to remove duplicates.
If this is correct this is what I do in these situations:
Clean up the data 1st then make your key field.
Since i don't want to lose my data, I'll start of by creating duplicates of the columns I'm trying to convert into a key field and do my cleaning on those columns especially since the column merge will remove the columns being merged, this means I only lose the duplicate columns not the originals.
Here are the steps:
Choose a seperator if you want to add one and name your new column
Hope this helps.
FYI that you can Ctrl click on your number and date columns to select them both, and then choose Remove Duplicates from the ribbon under Remove Rows. To concatenate them, they both need to be type text, so you'll need something like:
= Number.ToText([Number Column]) & " " & Date.ToText([Date Column], "yyyyMMMdd")
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
As @sean_w said it is quite hard to give a straight answer without a little bit more of context. My suggestion would be to, prior to the combine step in the Query Editor, changing the type of the two columns to "type any" and then combining the two. After the combine is performed, changing back to "date" and "Int64.Type" (i guess its this type you have now) to maintain data consistency and quality.
Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!
Best regards,
Gonçalo Geraldes
Without seeing the data types, how you're trying to combine the data, and the error, this is a bit of a shot in the dark. Given you're dealing with two different data types, it's likely that you're attempting to use a function that doesn't handle the data types. Here are a couple resources that might be helpful:
Power Query Merge Columns help article:
https://support.microsoft.com/en-us/office/merge-columns-power-query-80ec9e1e-1eb6-4048-b500-d5d42d9...
Power Query Function references:
https://docs.microsoft.com/en-us/powerquery-m/number-totext
https://docs.microsoft.com/en-us/powerquery-m/date-totext
Hi Sean,
Thanks for the feedback - @mahoneypat has managed to provide a solution 😊
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
34 | |
30 | |
20 | |
19 | |
12 |