Forum Discussion

dbartek's avatar
dbartek
New Member
3 years ago

Empty report for dynamic tables

Hello,

 

We need to create an empty report for any SQL table using REST API. 

Our plan was to create empty parametrized (server, database, table and schema) report in PowerBI desktop and later import it and update parameters to correct ones.

Plan generalny almost works - the only problem refers to dataset schema - dataset displays schema from original report (the empty one).  In "Edit query" window (PowerBI desktop) data displays properly, but I can't refresh it in the dataset.

 

query used in report

let
   source = Sql.Database(server, database),
   records = source {[Schema=schema,Item=table]}[Data],
   results = Table.SelectColumns(records,Table.ColumnNames(records))
in
   results

 

Any suggestions how could I fix this issue? Simple refresh did not work.

 

Data are connected using Direct Query from SQL Server database through configured gateway.

 

Thanks in advance,

Bartek

No RepliesBe the first to reply