Skip to Content
Personal Insights
Author's profile photo Venkateswaran (Venkat) Krishnamurthy

SAP Analytic Cloud (SAC) – Speedometer

Introduction

When it comes to present data in the understandable way, charts & graphs are coming to mind first. There are many ways to present the data. They are specific to the data and person how he/she would like to see. However to present a monitoring kind of data, speedometer is one of those to highlight the status.

In this section, I would like to present how a speedometer can be displayed in SAC application dashboard.

The SPEEDOMETER‌ Chart is just like a speedometer with a needle which shows you a number by pointing it out on the gauge and that needle moves when there is a change in the data. It is basically a single point data – not comparing – but shows with min and max range with appropriate risk attributes.

Note : There may be number of articles available in internet as blog posts. The intention of this document is a self documentation that collects all what we learned and put it one place to refer future and may be helpful to others as well.

Brief Snapshot

In this section, we provide the Sales dashboard – that the sales department monitors in terms of number of invoices raised and Amount along with the alert viz. Red/Yellow/Green zone.

Pre-Request

We need to have a model with following

Dimensions

  • YYYY   – Grouped by Year
  • MM      –  Grouped by Month
  • CUSTOMERID – Grouped by Customer

Measures

  • KOUNT – Total number of Invoices
  • AMOUNT – Total amount

Please refer to the SAC – model

 

Steps to Create Speedometer

  1. Create Model create a model that shows Salesman wise Invoices as above.  We will be creating the Speedometer for a Salesman or for a Year.  So I make sure that I have a dimension available in that model.

2. Verify Measure and Attributes . Make sure you have the Measure.  In this case I have two measures, one for by Count and other by Amount

3. Create Application   Create SAC Application. (Not Story)

4. Create Gadget  Click on + Add – and Select R-Visualization

  • In the Designer Box,
    • In the Input Data – Select the Model
    • In the Rows – Select your Dimension (either YYYY or SALESMAN)
    • In the Columns Select your Measure (either KOUNT or AMOUNT)
  • In the Script add the following Script
  • # Gauge
    library(googleVis)
     Gauge <-  gvisGauge(EV_CANC1, 
                        options=list(min=0, max=800, 
                                     greenFrom=0, greenTo=100, 
                                     yellowFrom=101, yellowTo=500,
                                     redFrom=501, redTo=800, width=400, height=300))
    plot(Gauge)

Apply the Configuration and Save.

5. Now you can see the Speedometer

You can now refer to the script and speedometer.

In the above speedometer, the Count of invoices are referred. (This counts are basically the cancelled invoices)

Gauge <- gvisGauge(EV_CANC1,
options=list(min=0, max=800,

green From=0, greenTo=100,

yellow From=101, yellowTo=500,

redFrom=501, redTo=800, width=400, height=300))

where, EV_CANC1 – refers to the Model from which the data is pulled in.

  1. Green Range is set to 0 – 100   (that means the cancelled invoices lessthan 100 is okay)
  2. Yellow Range is set to 101 – 500 & Red range is set to above 800
  3. and speedometer range is set to  0 – 800.

Summary

The R-Visualization gadget allows us to embed the Speedometer in the SAC application.  Further this gadget has option to Edit the style with respect to Setting titles, Filters, etc.  So for any management dashboards, we can present this Speedometer for any specific data viz. Sales , Accounts Receivable, Cash Balances, etc.

Closing Note

Please Share your views with me in the comment section, I’d love to hear from you and please don’t forget to share this tip if you feel it is helpful.

 

 

 

 

 

 

Assigned Tags

      11 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Vinícius da Costa
      Vinícius da Costa

      Excellent! This Speedometer is very nice.

      Author's profile photo Manuel Joaquim da Silva Robalinho
      Manuel Joaquim da Silva Robalinho

      Nice Job. Thanks for share.

      Author's profile photo Lucinda Araujo
      Lucinda Araujo

      Great , Do I need to have a server for R ? what kind of maintenance should I have or it is not necessary related to R application

      Author's profile photo Venkateswaran (Venkat) Krishnamurthy
      Venkateswaran (Venkat) Krishnamurthy
      Blog Post Author

      No, you do not need server for R.

      The SAC provides this option.

      Author's profile photo Valery Bogdanov
      Valery Bogdanov

      Hello Venkat,

       

      Thanks for such a nice and simple guide about this R visualization from Google.

      Do you know how I can get rid of a footer/disclaimer at the bottom of the meter?

      Author's profile photo Venkateswaran (Venkat) Krishnamurthy
      Venkateswaran (Venkat) Krishnamurthy
      Blog Post Author

      Dear Valery,

      Thank you for the comment.

      Yes, I am also searching for technique to hide this footer.  Not able to find it so for.

      Regards,

      Venkat

       

      Author's profile photo Smijoe Augustine
      Smijoe Augustine

      Hi Venkat,

       

      Thank you for this, very useful, but, were u able to find a way to hide the disclaimer. Can you kindly let me know

      Thank you

      Regards

      Smijoe

      Author's profile photo Diogo Martins
      Diogo Martins
      I tried this:

      .
      .
      .
      Gauge$html$footer <- NULL
      Gauge$html$jsFooter <- NULL
      Gauge$html$caption <- NULL
      
      plot(Gauge)

      it worked for me.

      Regards,

      Diogo

      
                    
      Author's profile photo Lakshmi Krishna Iyer
      Lakshmi Krishna Iyer

      Hello Venkat,

      I am trying to replicate this and unable to install the googleVis package. Can you guide ?

       

      Thanks,

      Lakshmi

      Author's profile photo Jens Heger
      Jens Heger

      Hi Venkat,

      is it possible to fill the min/max and from/to values via datasource, too?

      Thank you very much!

      Jens

      Author's profile photo Benaissa Tayibi
      Benaissa Tayibi

      Export in PDF possible?