Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Help with Data transformation

I have exported data from. csv files to Power BI. One of the columns contains text values ( product description) and is getting dispersed across other columns. It looks the same in excel as well. Is there anyway I can transform or shape it, so that the product description fits in one single column? In this example the first column contains product description while the second column contains time. Further, I have also noticed that Power BI shows that the data type of opt is text when it should be date time. This is probably due to the dispersion of text. I'm confused about how to proceed further and put the product description in a single column. Please kindly help. Thank you! 

Example :

Column names -  Product Description       opt

Row Values  -       Motor                 Single22:11

                             Gear                           Box

4 Replies

  • Hi Anonymous 

     

    Could you please upload one of your files to OneDrive, Google Drive or Dropbox then provide a link to it.  I don't knwo if the data you provided above is accurately formatted.  As I have to copy and paste it into a text file, there's a risk the formatting is lost.

     

    As it is, that file is not a CSV.  CSV stands for comma separated variable and the columns in that file are not comma separated.  They may be trying to use tab separated columns but when I try to import it, it's messed up, because there are tabs between  text in fields (like the description) as well as between columns.  Power Query is splitting  it up where it sees a tab.

     

    So, if that is an accurate copy of one of your files, the process by which the are exported and created is not really working.  The export of the data needs to be changed so you get files you can work with, preferably proper CSV files.

     

    Regards

     

    Phil

  • Hi Anonymous 

     

    If your source data is getting split across columns incorrectly then there's either something wrong with the format of the source CSV, or the import of the dfata is incorrect, or both.

     

    Can you please share a sample CSV file?

     

    Regards

     

    Phil

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for your prompt reply. Here is sample data that represents how the data is stored. Please kindly let me know how I could rectify this issue with the csv file. Thank you ! 

      ProductDescriptionOnHoldCodeOpTime$PlannedOpQtyWorkshopScheduleLockedPriorityCompleteProjectCodeDateCompletedStatusCodeEarliestStartDateResourceCodeProductGroupDateRequiredQuantityInStock      
      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------      
      MT MOTOR PLATES ASSEMBLY (RH)00:00:0040GLNo0NoAMNULL5NULLSUB NDT 00:00.03     
      PL WING 00:00:0044GLNo0No NULL7NULLSUB NDT 00:00.00       
      CH ASSEMBLY + CP56456500:00:003SMNo0No NULL7NULLSUB NDT 00:00.00       
      BU - Concession 3000012013 & 500001644800:00:0050GLNo0No NULL7NULLSUB NDT 00:00.032       
      MM Housing00:00:008GLNo0No NULL7NULLSUB PLT 00:00.0174       
      CNG LINK RIGID SAU 00:00:0030GLNo0No NULL7NULLSUB NDT 00:00.06     
      PIN CLEVIS LINKAGE 00:00:002SMNo0No NULL7NULLSUB HT 00:00.00     
  • Hi, Anonymous 

     

    Use the navigator to correctly import the data of your CSV file. If it still cannot be imported correctly, then you need to modify the data of your CSV file.

     

    refer:

    Connect to CSV files in Power BI Desktop

    Import CSV file to Power BI

     

    Best Regards,
    Community Support Team _ Zeon Zheng


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.