Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
i am providing BI reports to multiple customers with the same template and database,
right now duplicating the file for each customer and chaging the filter;
Is there a way to publish only 1 report which filter can change according to the user's login?
Solved! Go to Solution.
Not sure about your data set but you can make use of RLS, below you can see that how you can change the filter according to Login , for example Worker should only see Internal
Consider an example using Power BI embedded, where the app passes the user's job role as the effective user name: It's either "Manager" or "Worker". Managers can see all rows, but workers can only see rows where the Type column value is "Internal".
The following rule expression is defined:
IF(
USERNAME() = "Worker",
[Type] = "Internal",
TRUE()
)
The problem with this rule expression is that all values, except "Worker", return all table rows. So, an accidental value, like "Wrker", unintentionally returns all table rows. Therefore, it's safer to write an expression that tests for each expected value. In the following improved rule expression, an unexpected value will result in the table returning no rows.
IF( USERNAME() = "Worker", [Type] = "Internal", IF( USERNAME() = "Manager", TRUE(), FALSE() ) )
For more information check here >> Row-level security (RLS) guidance in Power BI Desktop - Power BI | Microsoft Docs
Regards,
Ritesh
Not sure about your data set but you can make use of RLS, below you can see that how you can change the filter according to Login , for example Worker should only see Internal
Consider an example using Power BI embedded, where the app passes the user's job role as the effective user name: It's either "Manager" or "Worker". Managers can see all rows, but workers can only see rows where the Type column value is "Internal".
The following rule expression is defined:
IF(
USERNAME() = "Worker",
[Type] = "Internal",
TRUE()
)
The problem with this rule expression is that all values, except "Worker", return all table rows. So, an accidental value, like "Wrker", unintentionally returns all table rows. Therefore, it's safer to write an expression that tests for each expected value. In the following improved rule expression, an unexpected value will result in the table returning no rows.
IF( USERNAME() = "Worker", [Type] = "Internal", IF( USERNAME() = "Manager", TRUE(), FALSE() ) )
For more information check here >> Row-level security (RLS) guidance in Power BI Desktop - Power BI | Microsoft Docs
Regards,
Ritesh
Thank you,
really appreciate the solution
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
20 | |
19 | |
18 | |
9 |