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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Manage Parameter from Database


let Source = Xml.Tables(File.Contents("C:\temp\example.trx")), #"Filtered Rows" = Table.SelectRows(Source, each ([Name] = "Results")), Table = #"Filtered Rows"{0}[Table], #"Expanded Table" = Table.ExpandTableColumn(Table, "Table", {"Attribute:computerName", "Attribute:duration", "Attribute:endTime", "Attribute:executionId", "Attribute:outcome", "Attribute:startTime", "Attribute:testFile", "Attribute:testId", "Attribute:testListId", "Attribute:testName", "Attribute:testType"}, {"Table.Attribute:computerName", "Table.Attribute:duration", "Table.Attribute:endTime", "Table.Attribute:executionId", "Table.Attribute:outcome", "Table.Attribute:startTime", "Table.Attribute:testFile", "Table.Attribute:testId", "Table.Attribute:testListId", "Table.Attribute:testName", "Table.Attribute:testType"}) in #"Expanded Table"

I want to pass below value as variable from SQL database table:

"C:\temp\example.trx"
1 REPLY 1
ankitpatira
Community Champion
Community Champion

@Anonymous I have played with your situation for a while unfortunately i think you hit a roadblock at the moment as the approach i took was to create a query that connects to your sql server table and convert it to parameter. Then use that parameter to replace url string in power query however problem is currently on few queries (that returns a single number, text, scalar values) can be converted to parameters and not all. Therefore in this case query that will return your value from sql server table even if you do it as select 1 will be returned as table and therefore not able to convert it to parameter.

 

I have read somewhere that feature of converting query to parameter is going to grow with newer releases and i would suggest you wait until you're able to convert. Until then vote for this idea.

 

Hope it make sense.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.