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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Shivam8683
Regular Visitor

Parameter as Search option

I have fetched data from an API. The data is about weather. It is giving me static location. But with the help of parameter i have made dimension dynamic. Now to change location every time i have to go to transform data>Edit parameter and change the parameter from there. Is there any other easy way to change parameter like a search box

7 REPLIES 7
bhanu_gautam
Super User
Super User

@Shivam8683 , Check below video

 

https://youtu.be/7TfV8qTUyfU?si=9_WjSImWTEiLKJbQ




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






But i don't have any location column. The api gives me data of whatsoever the location i enter in parameter 

  1. Create a new table in Power BI that contains the list of locations you want to use as parameters.
    For example, you can create a table named Locations with a column LocationName.
  2. Add a slicer visual to your report.
    Set the slicer to use the LocationName column from the Locations table.
    This will allow users to select a location from the dropdown list.
  3. Go to the Home tab and click on Transform Data to open Power Query Editor.
    Edit your query to use the selected value from the slicer. You can do this by creating a parameter in Power Query and setting its value based on the selected slicer value.
    For example, you can create a parameter named SelectedLocation and set its value using a DAX expression like SELECTEDVALUE(Locations[LocationName])

Use the SelectedLocation parameter in your API query to fetch data for the selected location.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






This will give data for values present in table. How can i enter any city, state, country without creating new table

Hi @Shivam8683, I think that with shared video and previous comments @bhanu_gautam  is highlighting the usefulness of lists to limit values that can be selected to make sure the query always returns a correct result. 

If you want to provide the maximum flexibility, simply create 3 parameters of type text for city, state and country and alllow any value to be typed. However, you should be careful as a wrong value can be inserted (city with typo, non-existing country etc.)

HI @bhanu_gautam, is it really possible?

If we talk about Import storage mode, I expect that PowerQuery is executed when semantic model is refreshing, therefore, any parameter value for API (to be used in PowerQuery) should be provided before semantic model refresh. In such case, when user is interacting with refreshed report (e.g. selecting some value in a slicer visual), it will not affect the refresh, thefore there will be no new API call. Isn't it so?

Maybe it works in a different manner when using DirectQuery, however even in this case, I don't expect that user can change parameter through interaction with a slicer on report canvas.

As of my knowledge, the only way to interact with parameters if not using PowerBI desktop is through "Semantci Models" in PowerBI service:

Sergii24_0-1721289065196.png

 

If you can provide some references where to learn more about your suggestion I'd be very grateful 🙂 Thank you!  

@Sergii24 , My bad yes you are right it will not work 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors