title: Error with Dynamic Row level security in Multidimensional OLAP
body: <p>I tried to run a Multidimensional project with Dynamic RLS.
  I used a <a href="http://bharathonsqlserver.blogspot.com/2016/07/dynamic-security-in-ssas-in-detail.html" rel="nofollow noreferrer">Sample</a> for implement it.</p>
  <p>In my sample scenario, I've a cub like below :</p>
  <p><a href="https://i.stack.imgur.com/ej4kS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ej4kS.png" alt="enter image description here" /></a></p>
  <p>I tried to write correct MDX query for test result of users permission.</p>
  <pre><code>SELECT {[Measures].[Point Transaction Count],[Measures].[Amount],[Measures].[Balance]} ON 0,
  NonEmpty ([Club].[Club].[Club].MEMBERS,([Users].[User Name].&amp;[[MyDomain]\a.ghasemi],[Measures].[User Permission Count])) ON 1
  FROM [DynamicPointTransaction]
  GO
  </code></pre>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;"></th>
  <th style="text-align: center;">Point Transaction Count</th>
  <th style="text-align: center;">Amount</th>
  <th style="text-align: center;">Balance</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">TestClub</td>
  <td style="text-align: center;">30</td>
  <td style="text-align: center;">34151</td>
  <td style="text-align: center;">99210</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>This result is true and when I change user name worked well in SSMS query editor.</p>
  <p>Now, my problem in Dynamic RLS, When I tried set query for use dynamically users in VS browser I catch a error for permission dimension.</p>
  <blockquote>
  <p>The 'Club' attribute in the 'Club' dimension has a generated dimension security expression that is not valid.</p>
  </blockquote>
  <p>I created a Role by DimesionData with Allowed member set like below :</p>
  <pre><code>NonEmpty (
  [Club].[Club Id].[Club Id].Members,
  (
  StrToMember (&quot;[Users].[User Name].&amp;[&quot; + UserName () + &quot;]&quot;),
  [Measures].[User Permission Count]
  )
  )
  </code></pre>
  <p>Add membership, add read permission for cub and dimensions.</p>
  <p>When browse with Role or users raise this error :</p>
  <p><a href="https://i.stack.imgur.com/HGs4M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HGs4M.png" alt="Choice user" /></a></p>
  <p><a href="https://i.stack.imgur.com/MkO66.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MkO66.png" alt="Error" /></a></p>
  <p>No different between Role and Users... error is stable.
  When choice Admin users, I don't have any error.</p>