MDX filtering by attribute for current user
Posted: Sun May 27, 2018 11:29 pm
Hello all,
I am trying to create an MDX statement which will allow me to filter by an attribute who's value is equal to the current user. Here are the details:
This MDX statement retrieves the current user in the }Clients dimension...
{StrToMember("[}Clients].[" + USERNAME + "]")}
So example this returns AD/Bob Smith
I have a dimension called versions and an attribute on this dimension called "Created by User" and I'd like to filter the versions only created by the current user.
When I hard-code the username the filter is a pretty simple filter by attribute statement...
{FILTER( {TM1SUBSETALL( [versions] )}, [versions].[Created by User] = "AD/Bob Smith")}
This is returning only the elements for user Bob Smith as expected.
When I try and combine the 2 MDX statements together I'm running into a bit of trouble and wondering if anyone had previously come across something like this and what a solution might be.
Thanks in advance!
I am trying to create an MDX statement which will allow me to filter by an attribute who's value is equal to the current user. Here are the details:
This MDX statement retrieves the current user in the }Clients dimension...
{StrToMember("[}Clients].[" + USERNAME + "]")}
So example this returns AD/Bob Smith
I have a dimension called versions and an attribute on this dimension called "Created by User" and I'd like to filter the versions only created by the current user.
When I hard-code the username the filter is a pretty simple filter by attribute statement...
{FILTER( {TM1SUBSETALL( [versions] )}, [versions].[Created by User] = "AD/Bob Smith")}
This is returning only the elements for user Bob Smith as expected.
When I try and combine the 2 MDX statements together I'm running into a bit of trouble and wondering if anyone had previously come across something like this and what a solution might be.
Thanks in advance!