Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Bert_Laws_SAP
Advisor
Advisor

Recently I downloaded the latest release of Visual Intelligence from SAP.  It has some very nice features, but few are as cool as the ability to add a Geographic hierarchy based on Latitude & Longitude.  Here's a use case where this makes sense:

Say that you have some data, maybe sales by Regional VP.  Each VP manages a region, say North, South, East, West, EMEA and APJ.  You'd like to see these sales on a map, but most maps don't know where to place "East".  With the new release of Visual Intelligence fixing this is a snap.  I created a step-by-step model to show you how to do it.

First, let's understand the data.  I created a very simple sample data set using Microsoft Excel (call it Lat_Long_Test.xls).

Note - to get to this data, I simply used Excel's RANDBETWEEN() function.  Fpr the dates, I seeded the first rown and then I added random numbers between -120 & 120 to the date in the previous row.  I used a random number between 1 & 6 for the regions and picked a random number between 1234 and 23456 for the sales.  This is just an easy way to create a lot of data. You'll get random patterns in your data so if you want to test out real timeseries patterns, you'll need to think up another data generation strategy.

To get the latitude and longitude of the regional office, I simply picked a hypothetical office location and found it's Latitude and Longitude:

I created a simple lookup table to assign the East, West...region names, because when I join the data in Visi, I'll want to join on Region=Region_Name.  I could have easily just put the region number in the second table and joined on that.  Then the fun begins:

  1. Start Visual Intelligence
  2. Select New Document ->MS Excel Data Source
    ->browse to LatLongTest.xls ->Select the “Sales” worksheet & Acquire
    the data
  3. ADD a worksheet (use Add button in upper right
    corner)
  4. Select MS Excel Data Source ->browse to LatLongTest.xls
    ->Select the “Region Locations” worksheet and Acquire the data
  5. Change back to the Sales data set in Visi
  6. Select Sales.Region_Name =
    RegionLocations.Region as the join criteria and Merge the data sets
  7. This brings the latitude & longitude into
    the data set
    1. I am not sure how I would boundary a specific
      region – I would probably choose mapping software for that level of detailed
      mapping
  8. Make Sales (Sum) as a measure (right click on
    the Sales attribute and select “Create a Measure”
  9. Create a simple Bar chart in Visi
    1. Drag Sales (sum) to the Y1 axis
    2. Drag Region to the X axis
  10. Change the Visualization type to a Gepgraphic Bubble Chart & Voila!

Where you go from here is up to you.  You could roll the Regional Hierarchies into more generic geographic hierarchies.  You could make the rollups more drill-able.  You could create multiple custom geo rollups - the sky's the kimit.  This is clearly just a quick and dirty example of what you can do with the new Latitude & Longitude functionality in SAP Visual Intelligence, but I hope that these detailed instructions might make it a little easier for you to give this a try on your own - with your own REAL DATA!

4 Comments