Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mallikarjun_h
Partner - Creator
Partner - Creator

SECTOIN ACCESS

 

The requirement is USER1

 

  • should see all 3rd month data in year 2011
  • should see all the data in year 2012

  

 

The code I have written for this is as follows

 

 

SECTION ACCESS;
LOAD * INLINE
[
ACCESS,USERID,CALENDAR YEAR,CALENDAR MONTH
ADMIN,ADMIN,,,
USER,USER1,2011,03
USER,USER1,2012,
]
;

 

 

But it is showing only 3rd month for year 2012.

 

The solution for this problem is to create a DUMMY user and put * against USER1 as follows

 

SECTION ACCESS;
LOAD * INLINE
[
ACCESS,USERID,CALENDAR YEAR,CALENDAR MONTH
ADMIN,ADMIN,,,
USER,USER1,2011,03
USER,USER1,2012,*

 

DUMMY,DUMMY,2012,01

 

DUMMY,DUMMY,2012,02

 

DUMMY,DUMMY,2012,04

 

DUMMY,DUMMY,2012,05

 

DUMMY,DUMMY,2012,06

 

DUMMY,DUMMY,2012,07

 

DUMMY,DUMMY,2012,08

 

DUMMY,DUMMY,2012,09

 

DUMMY,DUMMY,2012,10

 

DUMMY,DUMMY,2012,11

 

DUMMY,DUMMY,2012,12
]
;

  Need to find out the workaround for this problem as this approach is not feasible

4 Replies
Not applicable

hi,

if you you want to show all data then leave blank in section  access fields.give value for them who want to see selected data.

[

ACCESS,USERID,CALENDAR YEAR,CALENDAR MONTH

ADMIN,ADMIN,,,

USER,USER1,2011,03

USER,USER1

]

Not applicable

hi,

if you will give * (then you have to put all value in in field(dummy)) because * means -only that data which is available in section access field.

if you will give

CALENDAR YEAR,CALENDAR MONTH

2011,2

2012,3

now you will use * means only u can see 2,3

if you leave it blank then you will see all data available in field.


Regards

Vimlesh

morganaaron
Specialist
Specialist

The problem is that it's not understanding you want a relationship between year and month, so it's simply restricting month to the value you dictate unless it knows there are other values available.

The best way I can think to do this is to create a group or flag in your script. Attach this in your model to your date field, and then in your section access restrict on the group.

For (a rough) example:

If(Year=2012, 1,

If(Year=2011 and Month=3, 1, 0)) as GROUP

Then in your section access, use GROUP as your restrict field and 1 as the value to restrict on.

mallikarjun_h
Partner - Creator
Partner - Creator
Author

thanks for help but is there any other way???