Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have implemented section access in Qliksense with geo level hierarchy . The structure of hierarchy is REGION->Territory->SalesGroup with amount as a measure. Now client want to view the sales in TKL as well as in KL as UOM.
For this we have created a variable vKLTKL = if( getselectedcount(SalesGroup) >= 1 or getselectedcount(Customer) >= 1,1,1000)
1 -> KL
1000 -> TKL.
When we reload the app with section access and if we assign a particular sales group to an user and when we open QVF TKL to KL Flip is not working properly for section access with getselectedcount () function where as same is working fine without section access.
Any idea why it is not working ?
Vikas
Hi Vikas,
Will it be possible for you to share some sample code ?
As per my understanding you will be doing some selections on Salesgroup and Customers .. right ?
Br,
KC
we are passing SalesGroup or Customers through section access and the value of getselectedcount() is not changing accordingly that is a issue ! Is there any way or alternate function which will change the values through section access for this parameters ?
Thanks
Vikas
try like this:
if( len(SalesGroup) > 0 or len(Customer) > 0,1,1000)
Br,
KC
One reason could be after passing Customer through section access there could be more that one value assigned
or QS do not take that value has selected.
Can you please share your section access code ?
GetSelectedCount is based on user selections. Data access reduction will not set selected count. You could use GetPossibleCount() or a simple Count() function.
Section Access;
LOAD
//Name,
"ACCESS",
"USERID",
REGION,
TERRITORY_NAME,
SALESGROUP_NAME
// ROLE
FROM [lib://Lubes_SourceFiles/Lubes Dashboard Section Access.csv]
(txt, codepage is 28591, embedded labels, delimiter is ',', msq);
SECTION APPLICATION;
This a code for section access and variable which we have used for flip the TKL to KL is
if((GetSelectedCount(ProductBrand)>=1 or
getselectedCOUNT(ProductName)>=1 or
GetSelectedCount(SalesGroupName)>=1 or
GetSelectedCount(CustomerName)>=1
),'1','1000')
Please can you guide how to achieve is requirement.
Regards
Vikas
Try this:
if((GetPossibleCount(ProductBrand)>=1 or
getpossibleCOUNT(ProductName)>=1 or
GetPossibleCount(SalesGroupName)>=1 or
GetPossibleCount(CustomerName)>=1
),'1','1000')
Br,
KC
Hi Jonath & Jyothish ,
Thanks for your reply getpossiblecount is giving the no of records available in that field please refer the screen shot
for the same. Actually we require to change the count no 0 or 1 if any level is defined in section access.
Thanks
Vikas
Hi Vikas,
In this case you cannot use "getselectedcount" unless you explicitly select a value.
So as per the screenshot you attached, can you let me know what value are you expecting in the variable " vKLTKL" ?
Is it 1 or 1000 ?
I can see multiple levels under the filed.
Br,
KC