Forum Discussion
Parameter for Database Server and Schema to SQL Statement(Teradata)
Hello,
My dashboard is based on sql statement but I dont want to include Database Server or Schema manually in the query.
I have created parameters but i dont get to select both parameters because my backend is teradata.
How can I include Parameters in M query so that I can pass the database server and schema using parameters ?
my M query looks something similar.
let
Source=Teradata.Database(ServerNameparameter,[HierarchicalNavigation=true,
Query="Select column from Schema.table"])
in
Source
I want include my Schemaparameter in the place of Underlined/Boldfont "Schema" above in the code
thanks in advance.
3 Replies
- amitchandakSuper User
madhaviml15 , try if you can replace this with the M query parameter - PSchema
Query="Select column from " & PSchema & ".table"])
refer if needed
https://radacad.com/change-the-source-of-power-bi-datasets-dynamically-using-power-query-parameters
- madhaviml15Regular Visitor
that worked, thank you 😊
- madhaviml15Regular Visitor
yes it is working when replaced with Parameter in M query. Can we use Date parameters in where clause ?
and refer these parameters in 'Slicer' ? so from dashboard when we are changing the dates in either slicer or filters they have to be applied in the where clause of the query. is it possible?