Forum Discussion
Power BI csv import creating blank data
- 4 years ago
Yes, no matter what I did I could not get it to work via CSV import. In the end I created a basic R Script to import an RDS file (R Native file format) and it loaded fine.
Obviously something wrong with the CSV import process in Power BI for this file, but I just couldn't find the issue and squash it.
Hey, I know the thread is old, but just to add on, I agree with OP that PowerBI is doing something weird with `NA` values in csv files. I had the same issue, with the imported file reading in NAs as text rather than `null`, messing up the data types and making edits in power query nigh impossible.
The only solution I found, and I hate this, is to use `writexl::write_xlsx()` for the export from R. Then all `NA`s were correctly picked up as nulls. Seems like Microsoft has created an artificial barrier to privilege excel files and prevent the use of non-proprietary formats. Separate issue, but I also hate that they charge USD 10 a user just to view R visuals that are free and open source.