Forum Discussion
paulvans182
6 years agoHelper III
Invoke Function: Reference Query using Query name as parameter
Good morning, I am busy experimenting with invoking functions in Power BI. I am trying to find a method of Referencing a Query using Invoked Functions. I thought I could use the following: ...
- 6 years ago
Hi paulvans182
Sorry, probably misunderstood the original requirement.
try this
= ( strQueryName as table ) => let Source = strQueryName in SourceBest Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
6 years agoCommunity Champion
Hi paulvans182
Sorry, probably misunderstood the original requirement.
try this
= ( strQueryName as table ) =>
let
Source = strQueryName
in
Source
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
nfuids
3 years agoNew Member
I have a very similar situation, but instead of trying to reference a query/table, I want to reference a Parameter defined in my PowerBI file (not a function parameter).
So I basically have a parameter that
TrainA = "ID OF TRAIN A"
TrainB = "ID OF TRAIN B"
and I would like to be able to tell which of the 2 parameters should my function use.
like
myTable = CallMyFunction("TrainA"). Inside my function, I do NOT want the text "TrainA" but rather the ID of train A.
I dont see a parameter type of "parameter" as you proposed with the table type. Any way around this?