Forum Discussion
Getting duplicate values in Power BI
- 1 year ago
Hi aditya_ghui
Please Check for Hidden Characters:
Even though you've used TRIM, there might be hidden characters or non-printing characters that are not visible.
Ensure that there are no extra spaces or special characters in your PRODUCT_ID values.
You can use LEN function in SQL to check the length of PRODUCT_ID and see if there are any discrepancies:SELECT distinct PRODUCT_ID, LEN(PRODUCT_ID) AS Length
FROM [XXX-XX-XXXX].[PRODUCTS];
If your requirement is solved, please make THIS ANSWER a SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.
I am not sure why it is returning multiple values (have you checked the source to make sure there are no hidden characters or anything by checking the length?), however, once it is in Power Query, right click on the PRODUCT_ID field and select remove duplicates. That way, every time you refresh the data Power BI will always run the de-duplication.
- aditya_ghui1 year agoNew Member
Hello audreygerred,
We tried that option but it giving duplicate value only. I even tried by opening new Power BI desktop and fetch the data but same error.
Data source has only one row.