Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
Jacob
New Contributor II

Section Access | Help

Hi All

I have a requirement which is like this

i have list country

Country_NamePrice
Country 156
Country 270
Country 3451
Country 471
Country n564

 

User 1

should able to see country 1 and country 4 but he should not able to see the price of country 1 and he can see the price of country 4.

Country_NamePrice
Country 1 
Country 270
Country 3451
Country 471
Country 5564

 

1 Solution

Accepted Solutions
kamalqlik
Valued Contributor

Re: Section Access | Help

Hi please refer to given code:

Please use the following code:

SECTION Access;
LOAD USERNAME,
ACCESS,
USERID
FROM
[C:\Users\NaithaniK\Desktop\Sec_Map.xlsx]
(ooxml, embedded labels, table is Access);

SECTION Application;
LOAD
Sales,
USERID,
Country,
Product
FROM
[C:\Users\NaithaniK\Desktop\Sec_Map.xlsx]
(ooxml, embedded labels, table is DataTable);


LOAD
Cogs,
USERID
FROM
[C:\Users\NaithaniK\Desktop\Sec_Map.xlsx]
(ooxml, embedded labels, table is [Data Table Cogs]);

 

Please refer to attached excel:

You can add other country like this:

Output, when user 1 login;

He see Sales of both country but Cogs of one country only.

 

Please refer to screenshots below

image 4.PNGimage4.PNG

 

Regards

Kamal

 

 

5 Replies
miguelbraga
Valued Contributor III

Re: Section Access | Help

Hi there,

 

You can make a reduction in Country_Name to appear all countries but the first one. With these you would have a table without the Country 1.  I might be wrong but you can't make with section access to appear the Country 1 as blank, rather you won't the Country 1 at all. 

 

Your Section Access Inline Table code should look like this:

 

LOAD * INLINE [

ACCESS, USERID, PASSWORD, Country_Name

ADMIN, ADMIN, ADMIN, ADMIN

USER, USER1, U1, Country 2

USER, USER1, U1, Country 3

USER, USER1, U1, Country 4

USER, USER1, U1, Country 5

 

];

 

Hope this helps you. Also, please refer to these post:

https://community.qlik.com/t5/New-to-QlikView/Section-Access-query/td-p/341576

 

Best Regards,

MB

alexpanjhc
Valued Contributor

Re: Section Access | Help

section access;

LOAD * INLINE [

USERID,ACCESS,RIGHTS

'USER1',ADMIN, 1
'USER1',ADMIN,2

];

Section Application;

LOAD * INLINE [

RIGHTS, COUNTRY, PRICE

1,Country1,56

2, Country4, 

]

Jacob
New Contributor II

Re: Section Access | Help

Hi Alex

I have one question what if price get change it will work?

 

miguelbraga
Valued Contributor III

Re: Section Access | Help

Hi there,

I think it will work this way, don't worry. The section access will prevent you to see the Country 1's price values but the other price values will update if you update them.

Best regards,

MB

kamalqlik
Valued Contributor

Re: Section Access | Help

Hi please refer to given code:

Please use the following code:

SECTION Access;
LOAD USERNAME,
ACCESS,
USERID
FROM
[C:\Users\NaithaniK\Desktop\Sec_Map.xlsx]
(ooxml, embedded labels, table is Access);

SECTION Application;
LOAD
Sales,
USERID,
Country,
Product
FROM
[C:\Users\NaithaniK\Desktop\Sec_Map.xlsx]
(ooxml, embedded labels, table is DataTable);


LOAD
Cogs,
USERID
FROM
[C:\Users\NaithaniK\Desktop\Sec_Map.xlsx]
(ooxml, embedded labels, table is [Data Table Cogs]);

 

Please refer to attached excel:

You can add other country like this:

Output, when user 1 login;

He see Sales of both country but Cogs of one country only.

 

Please refer to screenshots below

image 4.PNGimage4.PNG

 

Regards

Kamal