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

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.

Reply
CheenuSing
Community Champion
Community Champion

How to pass parameter created through ManageParamter to a query that can use this value to filter

Hi @ImkeF , @TomMartens

 

1.  I created a paremeter called Level3 using ManagePAramter.

2. I have a query to do transformation called ExtractData

3. As the last step in the ExtractData query I want to pass the value in Level3 parameter.

4. Also next time when use Edit Parameters and change the value I should get a new set of rows based on the value entered.

 

How to acheive this ?

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
1 ACCEPTED SOLUTION
ImkeF
Super User
Super User

Sorry, was busy. Here is a good reference:

https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/

 

This missing bit might be how to use the parameter in the M code:

 

Perform the desired filter-operation by using a hardcoded value like this:

 

PBI_Parameter_Use_In_M0.jpg

 

and then repalce it by a reference to your parameter:

 

PBI_Parameter_Use_In_M.jpg

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

4 REPLIES 4
ImkeF
Super User
Super User

Sorry, was busy. Here is a good reference:

https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/

 

This missing bit might be how to use the parameter in the M code:

 

Perform the desired filter-operation by using a hardcoded value like this:

 

PBI_Parameter_Use_In_M0.jpg

 

and then repalce it by a reference to your parameter:

 

PBI_Parameter_Use_In_M.jpg

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

CheenuSing
Community Champion
Community Champion

Hi @ImkeF,

 

By the time your reply arrived , I had done the same thing as suggested by you.

 

Just  one more calrification , how to reference a table generated by a earlier query in another query.

 

I have a query called EMPMASTER.  I am creating another query to filter records from the output table of this query, in another query to filter records using parameter values.

 

Cheers

 

CheenuSing

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Hi @ImkeF,

 

Sorry for the trouble. I got it working , it was a typo error in the name of the previously stored query.

 

Thank you for your support at all times.

 

 

Cheers

 

CheenuSing

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
CheenuSing
Community Champion
Community Champion

Hi @MarcelBeug,

 

If this is possible can you please advise the steps.

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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