cancel
Showing results for 
Search instead for 
Did you mean: 

Merging queries

Former Member
0 Kudos

Is there a way to merge 3 realted queries into one?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member188080
Active Contributor
0 Kudos

Hi,

You can create one single workbook and add three sheets.

Just save as one query by executing it and then two more queries can be added one by one .

or you can have one query and variable of product and company code.

Thanks and regards

Former Member
0 Kudos

Hi,

Simply put filter on company code and product i.e. for company code you can include all the company codes which are required eg. 000, 001 and the same is for product also.

After that in the query drill down you put product and company code side by side so that the values shown for all the key figures will be as per the company code and product combination.

So even don't need to create any RKF also.

Regards,

Durgesh.

Former Member
0 Kudos

Create one more query with all the three queries rows and columns.

Former Member
0 Kudos

Its not that simple. Maybe my question is not worded correctly. What each query does is filters the selection based on a combination of company codes.

for instance:

query# 1, outputs data based on a combination of product codes and company code 0000 and 0001

query#2, outputs data basedon a combo of product codes and company code 0000

query#3, outputs data based on a combo of product codes and company code 0001

In all three queries the products codes are different.

The Characteristics and KeyFigures are same for all three queries. Time period for reporting is also same.

So in essence what is differet is selection and filters.

former_member199691
Active Contributor
0 Kudos

yes you can do that by creating Restricted Key Figures.

RKF1 - Restricted on company code 0000 and 0001 and products for these company codes

RKF2 - Restricted on company code 0000 and related products

RKF3 - Restircted on company code 0001 and related products

if products are mutually exclusive, create a CKF = RKF1 + RKF2 + RKF3 and use that in your query.

If products are overlapping, you can display these 3 RKFs as 3 different columns and name that in such a way that value these columns will represent are easily understandable. e.g.

- Products for 0000-0001

- Products for 0000

- Products for 0001

Regards,

Gaurav

Former Member
0 Kudos

Hi,

You said "The Characteristics and KeyFigures are same for all three queries. Time period for reporting is also same.". You can do this by adding another Structure in the Columns.

1. Create a new query with all the Chars (except the product code and company code) and key figures.

2. Create 3 selections in the columns.

3. For each selection apply the product codes and company code filters.

For example:

Selection 1 : query# 1, outputs data based on a combination of product codes and company code 0000 and 0001

Selection 2 : query# 2, outputs data based on a combo of product codes and company code 0000

Selection 3 : query# 3, outputs data based on a combo of product codes and company code 0001

The Selections naming can be done based on the 3 queries.

--

Sankar Kumar