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

Data Smoothing with Splines

Description Smoothing helps you to better visualize and understand noisy data   Prerequisites (The sample .pbix files will not work without these prerequites completed) 1. Install R En...
Smoothing Splines Showcase.pbix561 KB
ScriptInstallPackagesWithWorkaroundsSpline.R1 KB
General R Visualizations
jdt008's avatar
jdt008
Advocate II
9 years ago

We love this visual.  How should the script read if my dates are formatted as mm/dd/yyyy?

 

Thanks

  • boefraty's avatar
    boefraty
    Microsoft Employee
    9 years ago

    Hi, sorry for the delay in reply. 

    The X column is of type "numeric". You can convert "date" type to "numeric" in Power Query. Next you need to take care of X-axis ticks labels, to be formatted as you want. 

    I did something similar in 
    https://community.powerbi.com/t5/R-Script-Showcase/ARIMA-forecasting/m-p/124237

    Please have a look at the R code. If you still have trouble with it, you are welcome to send me the PBIX 

     

    • Anonymous's avatar
      Anonymous
      Not applicable
      8 years ago

      Been looking at this visualization lately as I need to plot some datapoints and need to add regression lines. I'm plotting revenue/sales per day, and using the date as the category/legend. However, I need one line for each of the days, instead of one for all the data points.

      How much work am I looking at doing smoething like this in R? 

      • boefraty's avatar
        boefraty
        Microsoft Employee
        7 years ago

        Hi, 

        This is quite simple to achieve if you have basic expertise in R. 

        I'd also recommend you to look at R Custom Visual  "Spline" it has regression lines 

        You can use it as a starting point. 

         

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