cancel
Showing results for 
Search instead for 
Did you mean: 

Fix bug which makes "empty" R-script rearrange entire table

I have a dataset in power BI that I want to analyse using an R-script. I add the script from this procedure: https://docs.microsoft.com/en-us/power-bi/desktop-r-in-query-editor But when testing with a script that is not supposed to change anything (contains only "output <- dataset") the output is different from my original table. Column content is mixed all over the place, rearranging the entire table.

 

This turns out to be a powerBI bug, where newlines and carriage returns are not handled ok. So if these are removed first, the script works ok. Please add comments if you have experienced the same with other symbols too. 

Status: Accepted
Comments
v-qiuyu-msft
Community Support

Hi @Larsen,

 

Which R version do you use in Power BI desktop? 

 

Is it possible to create a simple report with dummy entered data and share pbix file with us? If it is, you can upload it to your OneDrive and share the link here. 

 

Best Regards,
Qiuyun Yu 

Larsen
Frequent Visitor

Thank you!

 

I use R-version 3.5.1.

 

Here is my OneDrive link, let me know if I'm not sharing it correctly.

https://akerbp-my.sharepoint.com/:u:/r/personal/sunniva_larsen_akerbp_com/Documents/BugFixtest.pbix?...

 

v-qiuyu-msft
Community Support

Hi @Larsen,

 

I don't have permission to access it. If the report doesn't contain any sensitive data, you can share the file with anyone in OneDrive and paste the link here. 

 

Best Regards,
Qiuyun Yu 

Larsen
Frequent Visitor

I've tried once more, by rightclick "give access", "everyone". Hope it works:)

v-qiuyu-msft
Community Support

Hi @Larsen,

 

I'm still not able to access the file. Please share a new corresponding URL here. Thanks. 

 

Best Regards,
Qiuyun Yu 

Larsen
Frequent Visitor

I'm not allowed to share with everybody from this subscription. If you give me an email adr I can send it to you, or you could just create your own test table with newlines and carriage return.

 

Sunniva

v-qiuyu-msft
Community Support

Hi @Larsen,

 

I already sent you my work email address via private message. 

 

Best Regards,
Qiuyun Yu 

v-qiuyu-msft
Community Support

Hi @Larsen,

 

I have reported this issue internally: CRI 106524821. Will update here once I get information. 

 

Best Regards,
Qiuyun Yu 

v-qiuyu-msft
Community Support
Status changed to: Accepted
 
v-qiuyu-msft
Community Support

Hi @Larsen

 

I got information below: 

 

There is something we need to improve. Since the fix takes time, Cx can have workaround meanwhile as:

 

Issue1: if the column type is "Date", after executing R script, it will show "Microsoft.OleDb." instead of Date

            [Workaround] Change the column type into "Date/Time"

Issue2: if the value of a cell contains \r\n, after executing R script, it will be separated into several rows

            [Workaround] put the value that contains \r\n within quotes

 

Best Regards,
Qiuyun Yu