Forum Discussion

RashmitaR's avatar
RashmitaR
Icon for Helper IV rankHelper IV
10 years ago
Solved

DAX for a role

Hi,  I have a dataset with employee_id,Vertical,hours_avail,Hours_onleave. I need to write a dax query for a role.The main purpose of creating that role is to restrict the user who is logged in to ...
  • ankitpatira's avatar
    10 years ago

    RashmitaR You can make use of Username() function to identify logged in user. In power bi service it will be user's email address. Therefore in your dataset you can include column of user email address and write DAX filter as (suppose column is called UserEmail), [UserEmail] = Username(). Provided these column is in same table, it will be filtered with Vertical column that use belongs to. BTW row level security has now moved from power bi service to power bi desktop with latest power bi desktop update.