Skip to Content
0
Nov 18, 2016 at 02:23 AM

Replacement path using Query - How to filter based on values entered in main query?

670 Views

Hi guys,

Just want to ask if there is a way to filter the query used in the replacement path (query) based on the values entered in the main query?

For example:

QUERY1 (main query) - FILTER TAB (doesn't have the SEGMENT field) - under DSO1

ZVAR_MONTH - variable for 0CALMONTH with MANUAL INPUT (interval)

ZVAR_COMPCODE - variable for 0COMPCODE with replacement path (using the QUERY2)

QUERY2 (sub query) - FILTER TAB - under DSO2

SEGMENT - filter to include "TEST" values only

ROWS/COLUMNS TAB

0COMP_CODE (jn ROWS)

With the queries above, my result in QUERY1 will be all the company codes under the SEGMENT "TEST". Right?

However, I have several data in my DSO2 so the query reads all the data just to get the values of company codes under segment "TEST". Thus, the QUERY1 runs SO SLOW, more than 30 mins just for a month data. Without the ZVAR_COMPCODE, the query runs under 5 minutes for 1 month of data.

I'm just wondering if there is a way to filter the QUERY2 using the values entered in QUERY1 for ZVAR_MONTH? So, if user entered 10/2016 in QUERY1, I wanted QUERY2 to read only the data under 10/2016 also and not the whole data of DSO2.

Is this possible?

Thank you.

Loed Despuig