Forum Discussion

earlr1765's avatar
earlr1765
Regular Visitor
2 years ago

Source references other queries or steps, so it may not directly access a data source. Server

Rather that write independant sql queries and then join the tables later, I am interested in creating a parameter dimension table where it adds a column which is essentially a sql query based on a value in that row. I've looked up Parameterized SQL Queries but those tend to be a single query returned examples. 

 

So visually I have a table where the parameter is the first column, and the second column are the records that come from a SQL query that referencing the row value of the first column.

 

ClientParameterSQL_Query
ASELECT * from TABLE where ClientParameter = "A"
BSELECT * from TABLE where ClientParameter = "B"
CSELECT * from TABLE where ClientParameter = "C"

 

The results of that table I would want to expand as new nested rows. I'm sort of thinking of the current behaviour when you list of files in a folder, and then expand the binary results of those files to create new rows. 

 

I managed to get this to work by using the = Sql.Database("server", "database", [Query="Select ...."]) statement. 

 

So using PowerBI, I read in the ClientPameter table and then generate a new column that is based on this SQL query, where I'm referencing the row. 

 

To make this work in PowerBI server, I figure that I need to provide the client parameter using an excel file that I upload to our sharepoint server. 

 

When I view the result in PowerBI Desktop, it all works, but when I upload this to PowerBI server it complains providing a message that the powerbi file references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.

 

I found a video where the they explain this has to deal with privacy settings and also explain how to solve this (45 min into). https://www.youtube.com/watch?v=IQpniTiXQiI

however none of this fixes the issue. 

Is this ability something that is just broken in the current PowerBI server? 

 

2 Replies