Forum Discussion
dkrishnan
6 years agoFrequent Visitor
Display measure by User role
Hi All Thanks in advance to your help. I have two fields as measured value. I want to show a single value on charts or tables based on the user. Example, if user A logged in, then i would lik...
dm-p
6 years agoSuper User
Hi dkrishnan,
If you literally have two users and one measure to worry about then you can write a measure that does a check on USERNAME, e.g.:
IF(
USERNAME() = "USERA", SUM(Data[ACTUAL_AMOUNT]),
SUM(Data[BLENDED_AMOUNT])
)
But this is not maintainable if more users or roles need to be taken into consideration. In which case, you should use row level security and some modelling changes to dynamically handle measures.
BI Elite has an awesome walkthrough on this and explains it better than I can in a forum post.
Good luck!
Daniel
dkrishnan
6 years agoFrequent Visitor
Hi
Thanks for the input. I have a rough idea based on the video link you sent. I already implemented the selected measures. I will need to tag the roles and test them. Will keep you posted.
regards
deven