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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ldwf
Helper V
Helper V

Using Query Parameters in Performance Analyzer query

Hello, I have a query I copied from PBI desktop and am pasting it into a Report Builder query which connects to a PBI dataset in the cloud.  I created two query parameters (i.e, not report parameters) by clicking on Query Designer and adding the two parameters.  One is a date and the other is a text value.  I want to default both to a specific value but still allow the user to select any value from the dropdown list.  when I run the query, the date parameter doesn't default to any date (I need to select it in the date picker), and the text value defaults to some text that looks like this: [Dim Country].[Country_Name].&[United States].  I want the default value to just be United States, which is the value I indicated (i.e, selected) as the default value when I built the parameter.  Any ideas how I can get this default to work correctly?  Thanks!

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @ldwf ,

Maybe I haven't understand your problem correctly, why not directly set the United States in the parameter.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I did set this as the default parameter, but for some reason it didn't take.  In any case, I have a bigger issue in that I want to be able to modify the code such that for whatever date the user selects in the prompt, it retrieves the past 13 months from that date, so if user selects October, 2022, the code needs to be updated to return data where the date is between 'prompt date minus 13 months' and 'prompt date'; i.e, between October 2021 and October 2022

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.