Forum Discussion

iversa's avatar
iversa
Helper I
9 years ago
Solved

How do I pass parameters to a dashboard

I have 10-15 sales reps and want to share a dashboard/report in Power BI but need to pass a parameter to these reports by default. For example, each sales rep is only supposed to see their sales totals. If possible the president of the company suppose to see all data. There I may just create a separate dashboard but for the sales reps I want to use the same dashboard.

 

Any idea how I could do this

  • No, row-level security is what you're looking for.  The reason I asked about the API is because this section of the forum tends to focus on the Power BI API / Embedded version.

     

    You'll most likely want to target this question in the "Desktop" forum.  I'll give a little more clarity:

     

    Does your dataset currently capture the sales team member's email address anywhere? For instance, do you have a 'User' table that has the UserID, Email, Name, etc?  If you do, then your data is perfectly shaped to use RLS wih the USERNAME() DAX function.  This would filter would capture the user's email address (Office 365 account) when they view the report and filter the dataset accordingly.

     

    I strongly suggest checking this out, it should give you enough guidance: https://powerbi.microsoft.com/en-us/blog/using-username-in-dax-with-row-level-security/.

5 Replies

  • malagari's avatar
    malagari
    Continued Contributor

    This sounds like row-level (or role-based) security.  Are you creating this dashboard through the Power BI API, or publishing the report via Power BI Desktop?

    • iversa's avatar
      iversa
      Helper I

      Yes, that is correct in that it would be a row-level security

       

      I'm publishing the report via Power BI Desktop. So far we have not anything using the Power BI API? Would that make it easier? Where would be start when using the API?

      • malagari's avatar
        malagari
        Continued Contributor

        No, row-level security is what you're looking for.  The reason I asked about the API is because this section of the forum tends to focus on the Power BI API / Embedded version.

         

        You'll most likely want to target this question in the "Desktop" forum.  I'll give a little more clarity:

         

        Does your dataset currently capture the sales team member's email address anywhere? For instance, do you have a 'User' table that has the UserID, Email, Name, etc?  If you do, then your data is perfectly shaped to use RLS wih the USERNAME() DAX function.  This would filter would capture the user's email address (Office 365 account) when they view the report and filter the dataset accordingly.

         

        I strongly suggest checking this out, it should give you enough guidance: https://powerbi.microsoft.com/en-us/blog/using-username-in-dax-with-row-level-security/.