Forum Discussion

bvalles's avatar
bvalles
New Member
9 years ago
Solved

R script with several dataframes

Hi,   I have a R script generating several data frames. Once the dataframes are uploaded in Power BI, I end up with all my dataframes and can use them.   The problem is when I want to update the ...
  • v-sihou-msft's avatar
    9 years ago

    bvalles

     

    When using R scripts in Power BI Desktop, it will generate one dataset for each data frame. If you generate multiple data frames with single R script, it will generate multiple datasets and repeat the R script for each dataset. We can't access the original script and make changes applied to all datasets by updating only one script.

     

    Also when refreshing dataset, it will run the R script again for each dataset which is very inefficient in your scenario. So I suggest you use multiple R scripts and each of them only creates one data frame.

     

    Reference:
    Running R Scripts in Power BI Desktop

     

    Regards,