Forum Discussion
Source references other queries or steps, so it may not directly access a data source
Hi Anonymous ,
First, make sure the related report works well in Power BI Desktop. Please open the related report file in Power BI Desktop, set the Privacy Level for all data sources used in the report as Organizational. And please set the paramter Kanban_Projects_dwkey and Kanban_IssueTypes similar with the one in below screen shot and check if the quries can get the expected data:
Please republish the report to Power BI Service and set privacy level as Organizational for data sources in Manage Gateways as well after the report run sucessfully in Power BI Desktop.
Best Regards
Rena
- Anonymous6 years agoNot applicable
I'm sorry if i was not clear. When hard-coding the values as you show in your example it works.
However, this is not how the parameter is set up, nor is it the desired behavior.
First I make a call to the SQL Server database used by all of the queries
let
Source = Sql.Database(DBServer, JIRA_Database, [Query="
SELECT jira_proj_dwkey
, jira_proj_name
, jira_proj_category_name
, jira_proj_key_cd
, product_owner_name
, CASE
WHEN proj_active_indicator='Y'
THEN -1
ELSE 0
END jira_proj_active_flg
, created_dt
FROM dbo.dim_jira_proj
WHERE jira_proj_dwkey > 0
"])
in
SourceKnowing that linking directly to a result sometimes causes a problem, I create one referencing the SQL call named JIRA_Project_fmSQL.
let
Source = JIRA_Projects_SQLLib
in
SourceThis creates the table RELATION_TABLE_Project_Information based upon a join of the user's entered data (USERTABLE_BaseProjectInformation) and the data returned from the project information pulled from SQL Server.
I cannot use the simple thing you posted as the user table contains additional information such as the project name, the manager, the start date of tracking, etc.
let
Source = USERTABLE_BaseProjectInformation,
#"Merge JIRA data table" = Table.NestedJoin(Source, {"jira_proj_key_cd"}, JIRA_Projects_fmSQL, {"jira_proj_key_cd"}, "JIRA_Projects_SQLLib", JoinKind.LeftOuter),
#"Expand JIRA Project Key and Full Name" = Table.ExpandTableColumn(#"Merge JIRA data table", "JIRA_Projects_SQLLib", {"jira_proj_dwkey", "jira_proj_name"}, {"jira_proj_dwkey", "jira_proj_name"})
in
#"Expand JIRA Project Key and Full Name"Using that result, I create the parameter list.
let
Source = RELATION_TABLE_Project_Information,
#"Filter to Software Projects" = Table.SelectRows(Source, each ([jira_proj_methodology_type] = "Scrum" or [jira_proj_methodology_type] = "Kanban")),
#"Removed Other Columns" = Table.SelectColumns(#"Filter to Software Projects",{"jira_proj_dwkey"}),
#"Removed Duplicates" = Table.Distinct(#"Removed Other Columns"),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Duplicates",{{"jira_proj_dwkey", type text}}),
#"CreateList" = Text.Combine(#"Changed Type"[jira_proj_dwkey], ",")
in
#"CreateList"If I use this parameter in a SQL statement, it throws the exception.