Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi!
I need help
In the Power BI report I want to bind the multi-selected slicer to parameter and use it in calling
a table-valued function in DirectQuery mode and pass the text parameter concatenating all the selected in slicer values separeted by comma
If in slicer with 5 possible values (Id1,Id2,Id3,Id4,Id5) are selected only 2 => the TVF parameter must be 'Id1,Id5'
Solved! Go to Solution.
Hi, @lbendlin !
Thank you so much for useful information! It is perfect for slicers with singel selection!
I decided my problem after compilation of information in two videos:
https://www.youtube.com/watch?v=ilTeVH2Cwck
https://www.youtube.com/watch?v=7XR6vhdqLCw
let
ProjectList = if SelectedProjectsIdsParameter is list then SelectedProjectsIdsParameter else {SelectedProjectsIdsParameter},
// Ensure all ProjectIds are treated as text
IdListAsText = List.Transform(ProjectList, each Text.From(_)),
Source = Sql.Database(MyServer, MyDatabase),
pbi_PUs = Value.NativeQuery
(Source, "SELECT
Column1, Column2, Column3
FROM [Reports].[MyTVF] ('" & Text.Combine(IdListAsText, ",") & "')",
null,
[EnableFolding = true]
)
in
pbi_PUs
Best regards!
Hi, @lbendlin !
Thank you so much for useful information! It is perfect for slicers with singel selection!
I decided my problem after compilation of information in two videos:
https://www.youtube.com/watch?v=ilTeVH2Cwck
https://www.youtube.com/watch?v=7XR6vhdqLCw
let
ProjectList = if SelectedProjectsIdsParameter is list then SelectedProjectsIdsParameter else {SelectedProjectsIdsParameter},
// Ensure all ProjectIds are treated as text
IdListAsText = List.Transform(ProjectList, each Text.From(_)),
Source = Sql.Database(MyServer, MyDatabase),
pbi_PUs = Value.NativeQuery
(Source, "SELECT
Column1, Column2, Column3
FROM [Reports].[MyTVF] ('" & Text.Combine(IdListAsText, ",") & "')",
null,
[EnableFolding = true]
)
in
pbi_PUs
Best regards!
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 10 | |
| 7 | |
| 7 | |
| 7 |