Forum Discussion

davidwhite83's avatar
davidwhite83
Frequent Visitor
6 years ago
Solved

Power Query CSV File is not in a usable format

 
 

I am currently working with a CSV file that our company recieves where portions of the data are not on the same row as the invoice number, date, and other information. If it was a small file I could use excel formulas to copy the information down under it reaches the next invoice number but this is rather cumbersome and looking for an alternative work around to be do this automaticly after the setup is complete.

 

Below is a screen shot of the data.

 

 

 

 

I need the RONUMBER, ROCLOSED, ETC. to be on the same line as the OpCode (i.e. 52HOZ01).

 

After I have formatted the information properly than I can use in PowerBI for great visualizations.

 

Thanks.

  • Nathaniel_C's avatar
    Nathaniel_C
    6 years ago

    Hi davidwhite83 
    One more step. In those columns that have blanks rather than null, you have to highlight the column and perform Find and Replace. Leave the Find box empty and then type null into the lower box. All lowercase, no quotes. This should do it.  What is strange is that just typing it into your source table does not work.  Let me know how this goes.


    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πŸ‘are nice too.
    Nathaniel

3 Replies

  • Nathaniel_C's avatar
    Nathaniel_C
    Community Champion

    Hi davidwhite83 ,
    If I understand correctly, starting from the bottom, you have a set of rows that you wish to align with the lower set of values. When you bring the file into Power Query there should be some null values. By going to the Transform tab, and clicking Fill Down, you will be able to fill in those lower rows. Then going back to the Home tab, Remove Rows, Remove Top Rows you will be able clean up the file.  Check out M is for Data Monkey by KenPuls . A great book for all this sort of clean up and more.

    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πŸ‘are nice too.
    Nathaniel

     




     

     

    • davidwhite83's avatar
      davidwhite83
      Frequent Visitor

      It works on the number portion of the file but not with names.

      • Nathaniel_C's avatar
        Nathaniel_C
        Community Champion

        Hi davidwhite83 
        One more step. In those columns that have blanks rather than null, you have to highlight the column and perform Find and Replace. Leave the Find box empty and then type null into the lower box. All lowercase, no quotes. This should do it.  What is strange is that just typing it into your source table does not work.  Let me know how this goes.


        If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πŸ‘are nice too.
        Nathaniel