Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I'm using an R script within Power Query to do some data transformations and return a scaled table. My R code is like this:
# 'dataset' contém os dados de entrada neste script
library(dplyr)
df_normal <- log(dataset+1) %>%
select(c(2:4)) %>%
scale df_normal <-cbind(dataset[,c(1)], df_normal)
output <- df_normal
This works OK in R Studio and I'm getting the df_normal dataframe as expected.
However, in Power Query I get an empty table!
How do I export the dataframe to a table?
I have not done much with R, but have you tried changing the last line to
dataset <- df_normal
as I believe that the 'dataset' variable is the interface between Power Query and R.
The latest version of Power BI Desktop seems to work for me.
User | Count |
---|---|
59 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
80 | |
62 | |
45 | |
40 | |
39 |