Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
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

Labels (1)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

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
Highlighted
Partner
Partner

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

Highlighted
Creator II
Creator II

Hi Forte,

Thank you. That should work.