Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rtaraka
Contributor II
Contributor II

How to refresh value from the filter selection to load script with store procedure

I'm fairly new to QlikSense. Looks for help on the below issue.

 

With the initial load script with passing a value to variable in the store procedure o get the data work fine.

But when we are create a report along with filter selection and refresh the data based on filter selection. Unable to get the data refresh by passing the value to the assign variable.

Here is the below script along with an example.

we have multiple campus where i'm getting it from the below select and load in the campus table. By using campus in the filter selection. IF i select a value ('A')  from campus filter then it needs to assign to variable (VCAMPUS) and refresh the load script for that campus.

Same situation with Year. If i change value from 2019 to 2020 then underlying script need to refresh with 2020 and get the data for the given selection of value.

 

- How to link a variable to filter selection. So it's can pass the variable to load script and refresh the data.

 

+==================================
LOAD
YEAR;
[YEAR_List]:
select distinct YEAR AS YEAR from (
select to_char(report_date,'YYYY') YEAR from cargo
union
select to_char(report_date,'YYYY') YEAR from passengers
union
select to_char(report_date,'YYYY') YEAR from operations)
order by YEAR;


LIB CONNECT TO 'PRWRT';
SET vQVDPath='D:/QlikSense';
SET vCAMPUS = 'DFG';
SET vMONTH = 'MAY';
SET vYEAR = '2018';
SET v_VAR1 = 'C';
SET v_VAR2 = '';
SET v_VAR3 = 'N';
SET v_VAR4 = 'N';
SET v_VAR5 = 'ALL';
SET v_VAR6 = 'ALL';
SET v_VAR7 = 'N';
SET v_VAR8 = 'N';
SET v_VAR9 = 'N';
SET v_VAR10 = 'C';

 

SELECT * FROM TABLE(MWAA_APSIRR_PKG.apsirr_type_cc_agt1('$(VCAMPUS)','$(vMONTH)','$(vYEAR)','$(v_VAR1)','$(v_VAR2)','$(v_VAR3)','$(v_VAR4)','$(v_VAR5)','$(v_VAR6)','$(v_VAR7)','$(v_VAR8)','$(v_VAR9)','$(v_VAR10)'));

 

LOAD
CAMPUS1;
[CAMPUS]:
Select DISTINCT CAMPUS AS CAMPUS1
FROM
TOOLBOX.CAMPUS

 

 

0 Replies