Skip to Content
Technical Articles
Author's profile photo Fabien AUBERT

Build an ad hoc analysis application with Analytic Designer

With the new APIs “Pause” and “Navigation Panel” in Analytic Designer you can now offer to your business users a real ad hoc analysis experience in an analytic application. Indeed, it happens that a business user wants to answer a single, specific business question without having to contact its IT department.

In this blog I will show you a simple application that allow a business user to do Ad hoc analysis on a SAC model.
 

Analytic Application Description

This very simple application is composed by:

  • 1 table
  • 4 buttons
  • 1 dropdown

The table is built on a standard model called “BestRun_Advanced” which contains data regarding sales of beverages. In my scenario I want as a Business User to explore my data at run time.

For that if you click on the “Open Navigation Panel” button you will see a panel displayed on the right of the application.

 

The executed code is as follows:

Table_1.openNavigationPanel();

On the right side of the navigation panel you can see the dimensions and measures that are in the table. You can modify some options of a dimension. In my case I have few hierarchies associated with the Product dimension. So, I can switch from one hierarchy to another. Or I can display the Totals. In case you use a BW query you will also be able to use the “Compact Display” and “Suppress Zeros” features.

On the left side of the panel you can see all the dimensions and measures that are available in the model. The dimensions and measures present in the table are already selected in this panel.

You can add dimensions & measures in the table by selecting them in the navigation panel. You can add them in a row or in a column.
 

Create ad hoc reporting analysis

I can from this Navigation Panel explore my data at runtime. The original table of the application shows the Gross Margin per Product. The result is displayed in a hierarchical way.

If I want to know the Gross Margin by Product and by Time, I just need to click on the row/column icons near the Time dimension. One icon is to add the dimension in a row, the other one in a column.

 

Each time I select/deselect a dimension or a measure the table is refreshed. Which means before selecting/deselecting another dimension/measure I have to wait for the end of the execution of the request. It can be tedious when exploring my data.

To avoid this, you can pause the refresh of the table widget until you have completed adding or removing dimensions/measures. This optimizes runtime performance because an unnecessary initial refresh is avoided, and remote queries won’t be triggered every time analytic application end users take an action.

In my application when I click on the “Pause” button (the label of my button switches to “Play”) I stop the refresh of my table. To refresh my table again, I need to click on the “Play” button.

Here, for instance I have added Discount, Quantity Sold, Time, Location and Store before clicking on the “Play” button.

 

The executed code is as follows:

When I click on the Pause Button:

Table_1.getDataSource().setRefreshPaused(false);
PlayAndPause.setText("Play");

Most of the end user’s interaction will take no effect until refresh is resumed

When I click on the Play button:

Table_1.getDataSource().setRefreshPaused(false);
PlayAndPause.setText("Pause");

 

Bookmark your analysis

Finally, I can save my analysis as a bookmark. When I click on the “bookmark” button my analysis is saved as a personal bookmark. This way I can save several analyses.

 

The executed code is as follows

var book = BookmarkSet.save("Demo" +ConvertUtils.numberToString(iBookmark), false, false);
DisplayBookmark.addItem(book.id, book.name);
iBookmark = iBookmark+1;

where iBookmark is a script variable

All my bookmarks names are displayed in the dropdown widget. Hence, I can switch from one bookmark to another one.

The executed code is as follows

var book = DisplayBookmark.getSelectedKey();
BookmarkSet.apply(book);

 

In Conclusion

In this blog post we have seen how to create a simple Ad hoc analysis application. In particular, we saw that by using the APIs “Navigation Panel”, “Pause” and “Bookmark” from Analytics Designer we can quickly build this kind of application.

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jordgian Snow
      Jordgian Snow

      Social media marketing is the use of social media platforms to connect and make a bridge with your audience social media marketing dubai to build your brand, increase sales, and drive website traffic

      Author's profile photo Aleksey Salinin
      Aleksey Salinin

      Fabien AUBERT thanks for the post!

      add for pause button:

      if (this.getText() === 'Pause'){
      Table_1.getDataSource().setRefreshPaused(true);
      this.setText("Play");
      } else {
      Table_1.getDataSource().setRefreshPaused(false);
      Table_1.getDataSource().refreshData();
      this.setText("Pause");
      }

      and at initialization for bookmarks we need to load BookmarkSet.getAll() and fill DisplayBookmark dropdownbox list

       

      Author's profile photo Fabien AUBERT
      Fabien AUBERT
      Blog Post Author

      Yes Aleksey that's correct !!