Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Removed Duplicates is giving Error: DataFormat.Error: We couldn't convert to Number.

Hi there 

 

I am new to Power BI. I've been trying to remove duplicates from a list of email addresses. 

No matter what I've tried this keeps giving me the Error: DataFormat.Error: We couldn't convert to Number

 

The data is coming from a CSV file. I've tried deleting the column the data is in and re-entering it, and changing the data type in Power Query. Has anyone else come across this issue before? 

Thanks

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi everyone

    Thanks for all your suggestions. I tried them all. Finally the only thing that worked was deleting the entire query, exporting a fresh CSV and building it again. 

    Makes me think it may have been something to do with the data source Permissions (?). Will try clearing and updating the permissions if it happens again (hopefully not). 

    Thanks again! 

5 Replies

  • mussaenda's avatar
    mussaenda
    Community Champion

    Hi Anonymous ,

     

    If possible to do, please delete the Change Type step on your csv and then remove the duplicates.

    So you can check which data is causing you an error. 

    After checking and cleaning, you can do the change type.

     

    Hope this helps

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi everyone

    Thanks for all your suggestions. I tried them all. Finally the only thing that worked was deleting the entire query, exporting a fresh CSV and building it again. 

    Makes me think it may have been something to do with the data source Permissions (?). Will try clearing and updating the permissions if it happens again (hopefully not). 

    Thanks again! 

  • AlB's avatar
    AlB
    Community Champion

    Hi Anonymous 

    Can you share the CSV file (or a sample of it), indicating the column that you want to remove duplicates from?

    And also the M code you were using

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Maybe check the original CSV file and check if you have the required data in your column, e.g. have no #N/A, blanks, mix of text and numbers, etc... 

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Anonymous 

     

    Is it a cell-level error? If so, I found a same error in below doc. It may be helpful. 

    Dealing with errors | Microsoft Docs

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.