Reply
Frequent Visitor
Posts: 3
Registered: ‎06-15-2016

Import SPSS file into Power BI

Has anyone been able to easily import an SPSS .SAV file into Power BI?  Any help would be greatly appreciated.  I am a Power BI newbie so please don't judge!

 

Thanks in advance for your help.

Rob

 

Super Contributor
Posts: 1,658
Registered: ‎12-15-2015

Re: Import SPSS file into Power BI

@reffr power bi desktop has number of in-built file connector that you can use but SPSS isn't one of it. therefore if you're able to convert spss file into any of these format then you can import. also of you are able to find odbc driver that can access spss file then in power bi desktop you can use odbc connector to access that file.

 

Capture.JPG

Follow me on Twitter: @AnkitPatira
Connect with me on LinkedIn: Ankit Patira
Highlighted
Occasional Visitor
Posts: 1
Registered: Thursday

Re: Import SPSS file into Power BI

[ Edited ]

Actually, via R, there is a possibility to at least load SPSS data. Unfortunately, variable labels seem to be lost, so I support this idea to improve Power Bi with a dataconnector for SPSS files, but this is a way to get data from SPSS to Power BI:

 

# 1. Install R https://mran.microsoft.com/open/

# 2. Install Microsoft R Client https://msdn.microsoft.com/en-us/microsoft-r/r-client-get-started
# 3. Now go to PowerBI, go to Get data > More > Other > R script and copy/paste this R script:

 

spssFile <- file.path("d:\\yourpath\\yourfile.sav");
tempFile <- "c:\\temp\\temp.xdf";
tempData <- rxImport(inData = spssFile, outFile = tempFile, overwrite=TRUE);
spssData <- rxFactors(inData=tempData, sortLevels=TRUE,factorInfo=c("weegvar"));

 

# In the first line, be sure to enter the path to your SPSS file and use double slashes (\\)
# In the last line, enter a variable in your dataset to sort on
# Reference and more info: https://msdn.microsoft.com/en-us/microsoft-r/scaler-user-guide-data-import