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

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

Reply
Vilori1200
New Member

create a line graph using a dynamic query

I need to create a line graph using a dynamic query that will receive as a parameter the value selected from a column of a table.

 

My data looks like this :

 

IDName
1New york
2Boston
3Chicago
4Miami
5Seatle

 

then when selecting a city from the table I can bring the values that I need in the graph.
Note: the graph query is dynamic and receives as parameter the name of the city.

 

Vilori1200_0-1650938914004.png

 

 

 

 

 

 

4 REPLIES 4
v-luwang-msft
Community Support
Community Support

HI @Vilori1200 ,

 

Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

Best Regards
Lucien

Vilori1200
New Member

@amitchandak 

I have finally created a measure and with this I was able to solve, grateful!

amitchandak
Super User
Super User

@ , if the table and line visual are interacting you can create visual like that

 

You can create a measure like one below and use in title to display city name

 

selectedvalue(Table[City])

 

https://docs.microsoft.com/en-us/power-bi/service-reports-visual-interactions

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

@amitchandak the table and line visual are not interacting.  Are independent data sources.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.