Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

[Issue] Using R to process data with "…"

It seems I've encountered a bug when using R in query editor in PowerBI desktop.

I have an .xlsx with some cells end with "…", take the following one as example.

1text100
2vertical…100
3text100
4vertical…100
5text100
6text100

 

2. Add a R script in query editor to process the chart. Write nothing but "ResultSet <- dataset"

3. After processed, the ResultSet will be disordered like this: 

pbi.png

 

4. If I remove all the "…", the data will be all good.

 

I've used RStudio do the same on the chart, it was OK. So I doubt if it is a bug specific in PowerBI R script.

Status: Needs Info
Comments
zjn0505
Regular Visitor

A workaround is using replace values to remove all the "" before running R script

Anonymous
Not applicable

I'd agree with @zjn0505 you're going to want to tranform the data before you input it into the R-visual. Depending on the R-script you're running, if you're not truncating/dropping the "..." values the script won't know how to calcuate off of them.

 

You can use the "Replace Values" or "Split Columns" tools in the Query Editor to remove the "..." and potentially have your R-script work correctly.

v-haibl-msft
Microsoft Employee

@zjn0505

 

I cannot repro the same issue in Mar 2017 version of Power BI Desktop. Please refer to following video and let me know if there is any difference between our repro steps.

 

 

Best Regards,
Herbert

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
zjn0505
Regular Visitor

@v-haibl-msft

Thanks for your reply.

I've upgraded to April 2017, and followed the same steps in your video, and the issue persists. I'll test on more devices later.