Skip to main content

Power BI

Needs Votes

Create a Data Connector for SPSS format files

Vote (137) Share
arturo's profile image

arturo on 20 Nov 2015 13:47:49

Create a data connector for SPSS Data Source (SAV)

Comments (9)
arturo's profile image Profile Picture

David Cristofaro on 14 Oct 2020 00:49:19

RE: Create a Data Connector for SPSS format files

I don't understand why this hasn't been done a long time ago. Microsoft wants us to move from apps like Stata and SPSS, yet there is no easy way to bring pre-coded data (data that is categorized).

IBM Statistics (formerly SPSS Base) is an app that offers all data to be easily coded with labels to correspond with its values.

For example, it is trivial to set for the Variable "Overall_Satisfaction" to set the following parameters:

1 - Not satisfied at all
2 - Slightly satisfied
3 - Mostly satisfied
4 - Satisfied
5 - Extremely satisfied

It is not clear how to bring in labels that would correspond to values in Power BI. Surely there must be people at Microsoft who are doing market research and dealing with coded variables in their studies.

I would switch from SPSS in a second if I could import an SPSS file and keep the value labels intact with each variable and corresponding values.

arturo's profile image Profile Picture

Amit Zaveri on 06 Jul 2020 00:15:26

RE: Create a Data Connector for SPSS format files

SPSS data can be imported using Python script. Please visit this blog for detailed steps https://amitzaveri.com/2020/06/04/import-spss-file-in-to-power-bi-using-python-savreaderwriter-library/

arturo's profile image Profile Picture

Rohini on 06 Jul 2020 00:02:50

RE: Create a Data Connector for SPSS format files

Create a Data Connector for SPSS format files

arturo's profile image Profile Picture

Peter King on 06 Jul 2020 00:01:02

RE: Create a Data Connector for SPSS format files

The fundamental problem is the labels. Importing data is easy. Importing variable and value labels is really really hard. I use a lot of categorical data and without labels any dashboard is meaningless.

arturo's profile image Profile Picture

Power BI User on 05 Jul 2020 23:53:00

RE: Create a Data Connector for SPSS format files


Hi everyone,
j
I tried via R , but it doesnt work, show me this error:

Detalles: "ADO.NET: R script error.
Error in rxImport(inData = spssFile, outFile = tempFile, overwrite = TRUE) :
no se pudo encontrar la función "rxImport"
Ejecución interrumpida


Could someone help me please?

thanks

arturo's profile image Profile Picture

Charel van DIjk on 05 Jul 2020 23:42:59

RE: Create a Data Connector for SPSS format files

Hello,

I have tried this one, but get a failure...

Details: ADO.NET: R-scriptfout.
Error in doTryCatch(return(expr), name, parentenv, handler) :
Could not open data source.
Calls: rxImport ... tryCatch -> tryCatchList -> tryCatchOne -> doTryCatch -> .Call
Execution halted

I have installed Windows R client en R Studio.

Do you know a solution?

I have no experience with R.

Greetings Charel

arturo's profile image Profile Picture

Jennie Fimbres on 05 Jul 2020 23:35:33

RE: Create a Data Connector for SPSS format files

Would like a connector for SPSS with Power BI

arturo's profile image Profile Picture

Jeroen Komen on 05 Jul 2020 22:46:22

RE: Create a Data Connector for SPSS format files

Actually, via R, there is a possibility to at least load SPSS data. Unfortunately, variable labels seem to be lost, so I vote for Microsoft to build a data connector, but this is a way to get data from SPSS to Power BI:

# 1. Install R http://aka.ms/rclient/download
# 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

arturo's profile image Profile Picture

Power BI User on 05 Jul 2020 22:33:05

RE: Create a Data Connector for SPSS format files

This would help those of us in marketing research.