• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Import of IP address xxx.xxx.xxx.xxx being imported as decimal number

I have a csv that has ip addresses in a column in the following format. I am importing it into power pivot, using From other sources - Test file method
It is being imported as a decimal number, 10.1121.

How can i import it and leave it as an ip address?

timestamp,server,location,environment,application,instance,tier,entity_type,status,name,msg_type,os_type,ip_addr,cpu_count,cpu_percent_used(%),cpu_warn_threshold(%),cpu_err_threshold(%),mem_size,mem_percent_used(%),mem_warn_threshold(%),mem_err_threshold(%)
2023-01-26T13:22:00-0500,copuvlpoca01,co,Dev,ERT,,Application,server,success,copuvlpoca01,server,Linux,10.112.100.16,4,21.75,85,90,15955,15.99,50,75
2023-01-26T13:22:30-0500,copuvlpoca01,co,Dev,ERT,,Application,server,success,copuvlpoca01,server,Linux,10.112.100.16,4,22.67,85,90,15955,16.00,50,75
2023-01-26T13:23:00-0500,copuvlpoca01,co,Dev,ERT,,Application,server,success,copuvlpoca01,server,Linux,10.112.100.16,4,17.46,85,90,15955,15.99,50,75
 
Here are 2 that have IP Addresses. These have not been previously imported. Thanks
 

Attachments

  • connection.csv
    98.8 KB · Views: 1
  • server.csv
    8.7 KB · Views: 1
When I tried to fetch data from within Power Pivot I got to this point, where I haven't yet checked the Use first row as column headers and the ip addresses are complete:

82710

however as soon as I tick that box, the IP addresses go wrong:

82711

I don't know why, however I went through Power Query instead:
In the data tab of Excel's ribbon, choose From Text/CSV:

82712

choose your file and click Import

82713

Then in the next dialogue choose Load to from the Load button:

82714

continued in next message (only 5 pics allowed)
 
…then in the next dialogue, ensure Add this data to the data model is checked and Only create connection:

82715

click OK. You then have a new query in Excel's Queries & Connections and you can go into Manage Data Model:

82716

where the IP addresses are complete:

82717

Now you have headers and complete ip addresses.

At an earlier stage, if you'd chosen to Transform Data instead of Load to…

82719

you'd have been able to add/alter/remove Applied Steps which Power Query added automatically, before Loading to…:

82718
 
I did the import and it creates a tab in the spreadsheet. I wanted all the input data, which includes multiple text files to be in Power Pivot, which provides me additional capability.
 
Back
Top