Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello,
I want to Execute a stored SQL Procedure in Excel and get the Parameters from an existing table in the same Excel book, so that users can fill in the parameters.
The stored procedure works fine when I fill in the parameters like this:
= Sql.Database("SQL01", "640", [Query="EXECUTE DBO._sp_memoriaal '2023', '1', '6'"])
I would like to fill in the parameters from the Parameters table which have 3 columns.
So the code should be something like this so it gets the values from the Parameters table:
= Sql.Database("SQL01", "640", [Query="EXECUTE DBO._sp_memoriaal, Table.Column(Parameters, 'Jaar', 'VanPeriode', 'TmPeriode')"])
But I don't know what the correct code should be to get this done?
Kinde regards,
Björn
= Sql.Database("SQL01", "640", [Query="EXEC [dbo].[_sp_memoriaal] '" & Text.Combine(List.Transform(Table.ToRows(Parameters){0},Text.From),"','") & "'"])
Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LearnAndPractise(Everyday) ) |
Hello,
Thank you for the solution, it works fine 👍
Just one thing, in the Workbook I use a sheet where the users can fill the Parameters (Table2) that are used in the Query for the stored procedure. When I change the cell value C2 in value "4", and then refresh everything, it changes the value back into the current value "6". How to solve this that it takes the value "4"?
Parameters code:
let
Bron = Excel.CurrentWorkbook(){[Name="Tabel2"]}[Content],
#"Type gewijzigd1" = Table.TransformColumnTypes(Bron,{{"Kolom2", Int64.Type}, {"Kolom1", type text}}),
#"Type gewijzigd" = Table.TransformColumnTypes(#"Type gewijzigd1",{{"Kolom1", type text}, {"Kolom2", Int64.Type}}),
#"Gedraaide kolom" = Table.Pivot(#"Type gewijzigd", List.Distinct(#"Type gewijzigd"[Kolom1]), "Kolom1", "Kolom2")
in
#"Gedraaide kolom"
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.