Forum Discussion
Anonymous
5 years agoNot applicable
CalculateTable with If condition
Hi, I am working on Dynamic row level security. The requirement is, if the Username() is present in Emp_ad then evaluate table 1 expression else evaluate table 2 expression. 1st expression i...
amitchandak
5 years agoSuper User
Anonymous , I doubt you can username in calculate table. But you should be able to use in table inside measure
- Anonymous5 years agoNot applicable
Hi amitchandak ,
Thanks for your reply. I added username() just to simplify the expression. I am not using username() instead I am using below expression:
If ( IFERROR(SEARCH("@",USERNAME()),-1) <> -1,
LEFT(SUBSTITUTE(USERNAME(),"@","-"),SEARCH("-",SUBSTITUTE(USERNAME(),"@","-"))-1),
RIGHT(USERNAME(), LEN(USERNAME())-9)