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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Pass parameter filter data

Hello everyone,
I would like to filter my queries in the way you see below through Power M and an if condition.
I would like to pass a parameter in a query and if that parameter is equal to the query value then execute the next query otherwise it does nothing.
I want to do this to make an embedded for customer of my report.
I ask you two questions in this regard:
1) is it possible to do that condition in Power M? do you have alternatives?
2) can I pass a parameter in Power Bi desktop and embed the report by passing the parameter in the code?

Thank you all

tarz_0-1632833809764.png

 

 

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , If this pro, and you embedding, then you can use Service URL

https://docs.microsoft.com/en-us/power-bi/service-url-filters

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak ,

Excuse me but is it very similar to creating an RLS?
I should limit access to the report because I would have to limit it based on user self-identification.
I would like to get the user ID and based on that ID I would like or not to have the query run and get the data.
I don't want to filter the data only.
I'm doing an embedded by customer so I only have a Masters credential that logs in and gets the token for the report.
I can't use a hierarchical RLS though because not all tables are linked and I don't have a hierarchy.
I would like the query to be executed only if the mail is linked to a certain ID.

Thanks

@Anonymous ,

Have you already explored this? see if these two can help

https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/embed-report

 

RLS in embedded

https://www.youtube.com/watch?v=yNF-_l2f7w0&feature=youtu.be

 

I am hopeful, you already done with token generation etc.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.