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: 
RanOuerg
Creator
Creator

Section access reduction on one field with date range Historical data

Hello,

I need to add section access where the reduction is on the Company field. However, I have other conditions:

  • Group 1: Should have access to company GH when the date is before 2024/12 and should have access to GHM if the date is after 2025/01.
  • Group 2: Should have access to GH only when the date is after 2025/01.
  • Group 3: Should have access to all data.

Note that, we have date for both companies for both years 2025 and 2024

What are the best ways to do this ? 

Thank you!

1 Reply
BrunPierre
Partner - Master II
Partner - Master II

Hi, how about a creating a composite of the company and ranges of dates as a linkage between section access and the model.

SECTION ACCESS;
LOAD * INLINE [
ACCESS, USERID, COMPANYYEARKEY
ADMIN, ADMIN, *
USER, GROUP1, GH-PRIORYEAR
USER, GROUP1, GHM-CURRENTYEAR
USER, GROUP2, GH-CURRENTYEAR
USER, GROUP3, *
];

SECTION APPLICATION;

DATA:
LOAD *,
Upper(Company) & '-' & If(Date(MonthStart(Date), 'YYYY/MM') < '2024/12', 'PRIORYEAR', 'CURRENTYEAR') as COMPANYYEARKEY
FROM <SourceTable>;