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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
pradeep92
Partner - Creator II
Partner - Creator II

Section Access Country level Restriction for Holiday List

Hello,

 I have got a requirement as below,

I am having 4 countries like IN(India),SL(Srilanka),US(USA) and DE(Germany) with their holiday list.

So when I am logging in, I would like to have only that specific country holiday list that will be further used in calculation.

My below findings:

 

SECTION ACCESS FIELD is COMPANY

Temp_Holiday:
Load *,'DE' as COMPANY Inline [Holiday_Day, Holiday_Date
Mon,'13/04/2020'
];
Load *,'US' as COMPANY Inline [Holiday_Day, Holiday_Date
Mon,'20/01/2020'
];

Holiday:
Load 
COMPANY,
Chr(39)&Concat(Date(Floor(Date#(Holiday_Date)),'DD/MM/YYYY'),chr(39)&','&chr(39))&chr(39) as Holidays
Resident Temp_Holiday group by COMPANYKEY;


Let vholidays = Peek('Holidays',0,'Holiday');

trace $(vholidays);

 

If  I login with DE it works fine as the vholidays variable uses 1st row which is nothing but DE0 but if I login with US,the holiday for DE is storing in the variable for US as well.

I would like to store the holiday list in a variable based on COUNTRY login because I am using that variable for calculation

in network days.

Kindly provide your inputs.

 

Regards,

Pradeep

1 Solution

Accepted Solutions
forte
Partner - Creator
Partner - Creator

Hello,

You need a variable definition that "works after" your Section Access. As you have described , you are filtering by COMPANY, so keep your table Holiday and change variable definition to set vholidays  = Only(Holidays);

When you need that calc on your dashboard just call $(vholidays)

Hope it helps

Regards

View solution in original post

2 Replies
forte
Partner - Creator
Partner - Creator

Hello,

You need a variable definition that "works after" your Section Access. As you have described , you are filtering by COMPANY, so keep your table Holiday and change variable definition to set vholidays  = Only(Holidays);

When you need that calc on your dashboard just call $(vholidays)

Hope it helps

Regards

pradeep92
Partner - Creator II
Partner - Creator II
Author

Hi Forte,

Thank you. That should work.