Forum Discussion
Generate filters for a report from c# API based on user
- Anonymous4 years ago
HI ms92ita,
I think RLS based on username should be more suitable for your requirements.
You only need to create a mapping table with username and recorders and link to other table records and assign roles on the power bi service side. (it can be assigned to a group)Then these filter effects will be dynamically applied to your dataset when the report data is loaded.
Solved: RLS with UserName() - Microsoft Power BI Community
In addition, if you do not want to add a detailed user mapping table to your data source, you also need to compare user mapping in your code.
You can add a tag field to your table field, then use the if statement in your code to compare the current username and default user list to return the tag and manually apply the filter effect based on the result.Regards,
Xiaoxin Sheng
HI ms92ita,
I think RLS based on username should be more suitable for your requirements.
You only need to create a mapping table with username and recorders and link to other table records and assign roles on the power bi service side. (it can be assigned to a group)
Then these filter effects will be dynamically applied to your dataset when the report data is loaded.
Solved: RLS with UserName() - Microsoft Power BI Community
In addition, if you do not want to add a detailed user mapping table to your data source, you also need to compare user mapping in your code.
You can add a tag field to your table field, then use the if statement in your code to compare the current username and default user list to return the tag and manually apply the filter effect based on the result.
Regards,
Xiaoxin Sheng