cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Multiple numeric chart widgets that consume the same data model "Questions on the Best Practices"

oliver_raths
Participant
1,144

Abstract Best Practices:

If you’ve multiple numeric chart widgets that consume the same data model

1.) consider enabling the Query Merge capability (In the toolbar, select File > Edit Analytic Application > Query Settings, then enable Enable Query Merge)

2.) or using the getData() script API method to display key figure values. This improves performance by avoiding multiple requests to the backend.

my Questions:

#1.) why it helps if i use the same datamodel?

#2.) what is the exactly meaning of it?

br Oliver

Accepted Solutions (0)

Answers (1)

Answers (1)

Bob0001
Product and Topic Expert
Product and Topic Expert
0 Likes

1) Using the same data model is the technical prerequisite for "Query Merge capability", which will under the hood try to optimize the queries sent to the system. There is one older blog describing this: https://blogs.sap.com/2019/11/13/smart-queries-for-sap-analytics-cloud-with-bw-live-connection/

2) Is the manual approach of 1) e.g. in case this is not working for you. In this case you could use a hidden table or chart and read the different value points from it using script APIs like getData and display the value e.g. with nicely formatted text fields.

In both cases it is about minimizing the queries sent from your application.

oliver_raths
Participant
0 Likes

Hello Bob,

thx for your answer:

it means, even if i use the same SAC Model to show KPI's in different charts:

- "Query merge" makes sense, because each chart initiates a separate BW backend call? (each BW call = 1 Query)

- are there still all these restrictions? (see Smart Queries for SAP Analytics Cloud with BW Live Connection | SAP Blogs)

- each of these charts use the same datasource (the SAC model = SAP BW query)


The following szenario saves time, bcs there'S only 1 backend call , instead of 4 BE calls?

- show 4 Numeric point charts (char_1, chart_2, chart_4, chart_5)

Bob0001
Product and Topic Expert
Product and Topic Expert
0 Likes

I would put it the other way round: because these charts use the same data model (BW query in the back) the query merge feature can be used to minimize number of requests (I wouldn't say one backend call per query, but for getting the general idea this is ok).

You can check the documentation for the latest restrictions, but from what I could see it is still the same.

Also 1) and 2) are different approaches for achieving something similar. You might start with 1). When you are affected by the mentioned restrictions you may go for 2), but there you cannot use standard charts. You would use a hidden table/chart with all data points, read the required ones from scripting and set them e.g. as text on some widgets e.g.:

// read the required data cells

var kf1 = hidden_table.getDataSource().getData(selection_for_kf_1);

var kf2 = hidden_table.getDataSource().getData(selection_for_kf_2);
// display the value (check that you really got a cell before)
text_1.applyText(kf1.formattedValue);
text_2.applyText(kf2.formattedValue);