Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
kushanNa
Advocate I
Advocate I

Method to use RLS (Multiple Parameters) with Power BI Embedded

I was searching for how to pass parameters to an embedded report and found the following great video by Adam from "Guy in a Cube."

https://www.youtube.com/watch?v=yNF-_l2f7w0&t=98s

 

The method described works well for a single parameter, but if you have multiple parameters, you might encounter issues.

 

Here is a simple solution I found for it:

  • Create a text parameter
  • Give a default current value by joining both parameters with a comma

kushanNa_0-1723874314779.png

next, write a M code to split these parameter and into two parameters

kushanNa_1-1723874333756.png

then use the resulting variables as your parameters in your direct query

 

kushanNa_2-1723874347686.png

create a new table with one column with all merged multiple parameters and bind that column with main parameter(param) you created (you need to apply RLS to this column)

 

include the merged parameters to your C# code

kushanNa_3-1723874369161.png

after that , follow the steps in the video and That’s it! This should resolve the issue.

 

Additionally, there are a few missing steps from the video that I’d like to share might help you:

  • You need to enter the client ID and secret on the C# secrets page before debugging.

kushanNa_4-1723874393286.png

  • The video uses the old playground interface. In the new playground, you need to click on the Developer Sandbox page and select "Use my embedded token."

kushanNa_5-1723874407904.png

Hope this helps!

3 REPLIES 3
tharunkumarRTK
Super User
Super User

 @kushanNa
I think you are not asking any question but presenting a usecase. I would suggest you to post this as a community blog but not as a post. 🙂

Thank you for sharing this info, I have question if you can answer then that would be great. I understand that you are using dynamic m query parameters and dynamic RLS functionality, incase if I assume you linked your RLS mapping table with the import mode table that you created by appending the parameters. The effective identity that you have passed from the C# code can filter the import mode (parameters) table because of RLS, but how will it change the M Query parameter value it will remain same unless some report user selects the value from a slicer or any visual? 

 

Need a Power BI Consultation? Hire me on Upwork

 

Connect on LinkedIn

 




Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!

PBI_SuperUser_Rank@2x.png

 

Okay, maybe I'm trying to understand the latter part of your question here. So, you are asking how the value changes on a parameter in a scenario where someone is not selecting the slicer value ?

To achieve that, you will need to use the Chiclet Slicer visual. Use it as a slicer instead of the traditional slicer. In the General settings of the Chiclet Slicer, change it to "Force Selection." & untick multiple selection . This will automatically select the value from the column and pass the parameter to the parameters.

Okay, This solves the requirement. Thanks for sharing.

 

 

Need a Power BI Consultation? Hire me on Upwork

 

Connect on LinkedIn

 




Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!

PBI_SuperUser_Rank@2x.png

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.