Forum Discussion

JoyCornerstone's avatar
JoyCornerstone
Resolver II
7 years ago
Solved

Power Query Editor Decimal Issue on Text Field

I am bringing in an excel spreadsheet with job numbers. The job numbers in Excel are of type "Text."  Samples include:   2102461 2103423.01 2103423.02 2112638 2112640   On the Power Query edi...
  • Anonymous's avatar
    Anonymous
    7 years ago

    JoyCornerstone,

    Please ensure that you have set the data type of the numbers to Text correctly in Excel. I make a test using your sample data by directly coping and pasting them to Excel as below.



    When I disable Type of detection option in Power BI Desktop, the data come in as follows.



    When I enable the type detection option in Power BI Desktop, the job numbers will be automatically changed to decimal number in Power BI Desktop query editor. I then delete the change type step in Query Editor, the job numbers are as below.



    Regards,
    Lydia

  • JoyCornerstone's avatar
    JoyCornerstone
    7 years ago

    Just wanted to leave this here for others how might find it later.  It took some work, but I was able to change my Excel columns to Text using the TEXT function in Excel.  

     

    Once you have linked them into PowerBi, the only way to get them to really be Text is to use the TEXT function in Excel. Then they will all read into the PowerBI successfully.