![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm studying the dynamic secuity webcast and implemented it in my cube model. After doing some tests, I've noticed that the code used to restrict the dimensions levels was going in error. The code is the following STRTOSET(IIF(USERNAME="","{}",SETTOSTR( NONEMPTYCROSSJOIN([Struttura].[UP].members, {STRTOMEMBER("[DIM_USER].[All DIM_USER].[" + USERNAME + "]")},1)))) on rows I've began to do the tests using the MDX Sample application, and I tried the same code, but not using the SETTOSTR and STRTOSET functions (these functions are necessary because the IIF functions needs it). And all things worked fine. My dimension Struttura has about 15.000 members and I begin to suspect that the function STRTOSET would have some limitation. I did sample tests with DB Foodmart and noticed the same problems. The following MDX codes are useful to reproduce the problem : Code (very simple, show all customers members) that works fine : select { [Measures].[Unit Sales] } on columns, {customers.[Name].members} on rows from Sales Code with Error (in teory is the same, first I try to convert to str a set and after reconvert the str to a set): select { [Measures].[Unit Sales] } on columns, strtoset(settostr({customers.[Name].members})) on rows from Sales The error is something like : "Unable to open cellset ... Token is not valid .... '[Customers]. ..... ,^,^,,,,,,,,, }" My question is if it is a bug or a limitation of the string size that the function returns ? Thanks for the help. Alex |
![]() |
| Thread Tools | |
| Display Modes | |
| |