Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pass values dynamically into section access

Hi All,

Greetings for the day!

I have script as below:

Load *  inline [

NAME,Value,Area,SubArea

JOHN,100,Area1,SA1

JOHN,110,Area2,SA2

JOHN,210,Total

CHRIS,210,Total

NANCY,101,Area1,SA3

NANCY,102,Area2,SA4

NANCY,103,Area3,SA5

NANCY,306,Total

ALEX,400,Total

];

As per my requirement i have to pass values dynamically into section access code like

If Area is 'Total' and and that user is not assigned to any other area (like CHRIS,ALEX) then

i have to pick NAME,TOTAL else i have to pick NAME,Value,Area,SubArea as like below code.

Section Access;

If Area = 'Total' and not assigned to other Area then

Load NAME,Area resident Data;

else

Load NAME,Area,SubArea resident Data;

endif

section application;

Is there any possiblity on this? If yes Could you please help me here.

Thanks,

QV11 User

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Yes that should be possible

Temp:

Load *  inline [

NAME, Value,Area,SubArea

JOHN,100,Area1,SA1

JOHN,110,Area2,SA2

JOHN,210,Total

CHRIS,210,Total

NANCY,101,Area1,SA3

NANCY,102,Area2,SA4

NANCY,103,Area3,SA5

NANCY,306,Total

ALEX,400,Total

];

Result:

LOAD NAME, NAME as CHECK, Area

RESIDENT Temp

WHERE Area <> 'Total';

CONCATENATE(Result)

LOAD NAME, Area

RESIDENT Temp

WHERE Area = 'Total' AND NOT Exists(CHECK,NAME);

DROP TABLE Temp;

SECTION ACCESS;

LOAD * RESIDENT Result;


talk is cheap, supply exceeds demand