Forum Discussion
VerenaS
5 years agoFrequent Visitor
Pass parameter to DAX Query within AnalysisServices.Database() statement
Hi all, is is possible to pass a parameter to a DAX Query inside an AnalysisServices.Database() statement? I have a Query like this: = AnalysisServices.Database("Servername", "Databasename", [...
- 5 years ago
Hello VerenaS
this record-field "Query" takes a text. So cou can hardcode it or use a parameter. Here an example how it could look like
ParYear = "2014" GetAnalysis = AnalysisServices.Database("Servername", "Databasename", [Query="YourQuerText Year=" & ParYear & " EVALUATE ........." , Implementation="2.0"])If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Jimmy801
5 years agoCommunity Champion
Hello VerenaS
this record-field "Query" takes a text. So cou can hardcode it or use a parameter. Here an example how it could look like
ParYear = "2014"
GetAnalysis = AnalysisServices.Database("Servername", "Databasename", [Query="YourQuerText Year=" & ParYear & " EVALUATE ........." , Implementation="2.0"])
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
- VerenaS5 years agoFrequent Visitor
Thanks a lot for your help, Jimmy!