Open Side Menu
Skip to contentBrand Logo
Forums
Inspiration
Ideas
Communities
Blogs
Learning
Support
RegisterSign In
  1. Microsoft Fabric Community
  2. Power BI forums
  3. Galleries
  4. R Script Showcase
Sharon's avatar
Sharon
Microsoft Employee
10 years ago

Forecasting

Description Forecasting is used to predict next points in time series data sets. The prediction in this example is based on trend and seasonality.     Prerequisites (The sample .pbix file...
Forecasting Showcase.pbix635 KB
ScriptInstallPackagesWithWorkaroundsForecast.R1 KB
Advanced Analytics Visualizations
boefraty's avatar
boefraty
Microsoft Employee
9 years ago

You didn't call "pbiviz new" command, instead you are updating the existing one. So you'll need to do two things:

1) change "guid" field inside "pbiviz.json" to be different string

2) call "pbiviz package" command from command line ( inside the folder of visual)

 

See more here

https://github.com/Microsoft/PowerBI-visuals/tree/master/RVisualTutorial

 

 

thefal's avatar
thefal
Frequent Visitor
9 years ago

Hi,

 

I am fairly new to Power BI and don't know a lot about R scripting yet. I downloaded the file, but it gives me an error in the left visual: there is no package called 'scales'. I also downloaded the R script that I assume installs these packages. But how do I run the script to create them?

 

I am using C:\Program Files\Microsoft\MRO-3.3.2 as my home directory and Visual Studio 2015 as my R IDE.

  • boefraty's avatar
    boefraty
    Microsoft Employee
    9 years ago

    I sent a reply to private mail. Hopefully it helps...  

     

    In general to install missing package you need to type install.packages("scales")   from any R command line (R studio or VS IDE). Alernatively, you run the script.

    See

    https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-powered-custom-visuals/

     

    Scroll down till you see:

    "Install R packages manually, using any R console"

     

  • ironryan77's avatar
    ironryan77
    Kudo Commander
    9 years ago

    I ran into this same problem initially.  What you have to do to fix:

    Update R for Windows from the R Script command line:

    if(!require(installr)) {
    install.packages("installr"); require(installr))

    It will tell you you're using 3.3.2, but the latest version is 3.3.3.  To update, run this command:

     

    updateR()

    Then open MRO 3.3.3 and load the scales package:

     

    This should install the zoo and forecast package for you, but if it doesn't manually install these packages from the screenshot above.

  • © 2026 Microsoft
  • Manage cookies
  • Privacy & cookies
  • Terms of use
  • Trademarks
Your Privacy Choices Consumer Health Privacy