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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.