COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Framework Manager => Topic started by: dencanhan on 04 Oct 2018 11:19:29 PM

Title: Parameter Map Use All values
Post by: dencanhan on 04 Oct 2018 11:19:29 PM
I have a problem when use Parameter map.
I have P_User_Role_Ou have key is user_id and Ou key. My Ou_Dim have more than 300 values. User have all  OU_code i use 'All' like
User_id | Ou_code
A             '101','102'
B            '103','104','105'
...
C           'ALL'
Then in fillter i use:
[Physical Model].[OU_DIM].[OU_CODE]  in (#$P_User_Role_OU{$account.personalInfo.userName}#) or 'ALL'   in (#$P_User_Role_OU{$account.personalInfo.userName}#)
=> It's very slow but if i move or 'ALL'   in (#$P_User_Role_OU{$account.personalInfo.userName}#) => run fast
Can help me.Tks all
Title: Re: Parameter Map Use All values
Post by: CognosPaul on 08 Oct 2018 01:19:35 PM
If you're using DQM you have access to the simple case macro function. Then you can do something like:

#case $P_User_Role_OU{$account.personalInfo.userName}
when 'ALL' then '1=1'
else '[Physical Model].[OU_DIM].[OU_CODE] in (' + $P_User_Role_OU{$account.personalInfo.userName} + ')'
end
#