Forum Discussion
How to return either a single text variable or multiple text variable with the IF function in DAX
Thank you tamerj1 ,
That was what I was concerned with. My example is exactly that. I am using RLS and I need to determine if the UPN is a manager or not which is in a column against the user. If you are not a manager then the Department table is filtered through RLS with the users department. If you are a manager then the Department table is filtered through RLS with multiple departments which is a query on the department table. This is essentially what I am trying to achieve.
This is the the table query I am using in RLS.
VAR DepartmentLvls =
CALCULATETABLE (
DISTINCT ( VALUES ( DepartmentTable[Node] ) ),
CONTAINSSTRING ( DepartmentTable[Node], { DepartmentLvls } )
)
Thank you kindly for your assistance.
Oops.. that code should be
CALCULATETABLE (
DISTINCT ( VALUES ( DepartmentTable[Node] ) ),
CONTAINSSTRING ( DepartmentTable[Node], { MyDepartment} )
)
- tamerj13 years agoCommunity Champion
Anonymous
can you provide a sample dummy data of the DepartmentTable?
- Anonymous3 years agoNot applicable
Sure. Basically, If the user has lets say the node .2521.3456.1885. as his department then he should only see that department in the reports. If the user is also a Manager then they should see all the departments starting from that node. Hence example below. The Nodes are text. If you are interested I could put up some cleansed cut back version in pbix.
.2521.3456.1855. .2521.3456.1855.1643. .2521.3456.1855.1643.1976. .2521.3456.1855.1643.2081. .2521.3456.1855.1643.2226. etc...
- tamerj13 years agoCommunity Champion
Anonymous
Yes please do.
How is a manager defined in your data?