Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 

A week ago I posted the first part about an app with 100 years of weather data. If you haven’t done this already you can read the article here :

In the second part I will describe some elements I built in the app. First I will describe how I made the listbox to drill down and how I made the top 10 / bottom 10 buttons.

Then I will describe how I made the bottom/average/top temperature buttons and some other interactive items.

The listbox

Actually there are 2 listboxes. With the properties it’s easy to align both of them on exactly the same spot. The trick is to set the visibility for the years listbox on when there is a decade selected or when the button TOP 5 or BOTTOM 5 is selected.

The script in the onselect from the decade listbox looks like this :


LISTBOX_YEARS.setItems(DS_TEMPERATURE.getMemberList("0CALYEAR", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 10));



First the filter of the temperature graph is set to the decade selected
Second the Listbox years gets populated with years from the temperature data source
Finally the listbox decades is set to visible = false and years visible = true.
For a user it still looks like the same listbox.

New version

Local variables are available in the new version. This would mean I could keep the value of the selected item. With that I then could store the selected value of decades in a variable. Switch the listbox to another datasource or switch the query in the datasource with .ASSIGNDATASOURCE and apply the filter using the stored value in the local variable. But that has to wait until I get my hands on the new version :smile:

Top 10 / Bottom 10.

Both these buttons are based on a query with a filter variable with a replacement path.

The replacement path is another query with a condition to only show the top 10 / bottom 10 years.
In the rows/columns the query shows the minimum, maximum and average temperature per calendar day.

When pressed the button follows the following script :

"0CALYEAR", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 10));





  1.       Decades set to invisible as we already selected the years with bottom /top 10
  2.       The years listbox is populated with the TOP10 query
  3.       The detail datasources are cleared from any filter that’s left from previous navigations
  4.       The listbox years is visible
  5.       The precipitation charts is set to invisible as several years are in the filter

Min/Max/ Average

The min/max average radiobutton is a filter on the key figure.
Rather than using an extensive IF THEN ELSE statement to determine which keyfigure to filter I should filter on based on the selection I just populated the items of the radio button object with the technical keys of the key figures

The on select script became much easier after that



CLEARFILTER to be sure no double filters would give me no key figure at all.Then setfilter with the selected value of the radio button


Getting the popup to show only the right values

Finally in the bubble chart you were able to click on a dot and a popup appears with detailed data for that dot. This can be done by using GETSELECTEDMEMBER.



In the ONSELECT() property of the bubble chart the script above is coded.

First we use the listbox month value to apply the first filter and then the 0CALYEAR dimension of the getselectedmember property of the bubble chart.
Together they filter on 1 calendar month which is shown in the popup.

Using all these techniques together will build you a nice interactive app. There is already a lot possible and with local variables and local calculations in the next version more will be possible.

1 Comment
Labels in this area