Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Bug when filtering the output of OData in a query

In the latest two updates of PowerBI, the attached .pbix file issues an error, which is perports is an Authorization error, when in fact the error appears to be a bug.  Here's a link to my oneDrive.

 

https://1drv.ms/u/s!AuVy-U2vn_fU6tpJi4TYheBvQUgBQA

 

To duplicate this problem, you'll have to replace the PWA URL with a valid one, and your PWA site will need to have some AssignmentBaseline data.

 

If a Microsoft employee wants to make direct contact with me, I'll provide an OData account they can use to duplicate the problem on our site, but I'm hoping that they'll have an internal site that will suffice.

 

In the Advanced Query editor, you'll see that you can enable and disable the error by commenting/uncommenting a few lines of code:

 

 

let
    Source = OData.Feed(#"PWA Site URL" & "/_api/ProjectData/[en-us]"),
    AssignmentBaselines_table = Source{[Name="AssignmentBaselines",Signature="table"]}[Data],
//  problem -- uncomment the next two lines
    #"Filtered Rows" = Table.SelectRows(AssignmentBaselines_table, each ([BaselineNumber] = 0)),
    #"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"BaselineNumber", "ProjectId", "AssignmentId", "AssignmentBaselineBudgetCost", "AssignmentBaselineCost", "AssignmentBaselineFinishDate", "AssignmentBaselineStartDate", "AssignmentBaselineWork", "ProjectName", "TaskId", "TaskName"}),
//  workaround -- comment the two lines above, and uncomment this next one
//    #"Removed Other Columns" = Table.SelectColumns(AssignmentBaselines_table,{"BaselineNumber", "ProjectId", "AssignmentId", "AssignmentBaselineBudgetCost", "AssignmentBaselineCost", "AssignmentBaselineFinishDate", "AssignmentBaselineStartDate", "AssignmentBaselineWork", "ProjectName", "TaskId", "TaskName"}),
    #"Renamed Columns" = Table.RenameColumns(#"Removed Other Columns",{{"ProjectId", "Project Id"}, {"AssignmentId", "Assignment Id"}, {"AssignmentBaselineBudgetCost", "Assignment Baseline Budget Cost"}, {"AssignmentBaselineCost", "Assignment Baseline Cost"}, {"AssignmentBaselineFinishDate", "Assignment Baseline Finish Date"}, {"AssignmentBaselineStartDate", "Assignment Baseline Start Date"}, {"AssignmentBaselineWork", "Assignment Baseline Work"}, {"ProjectName", "Project Name"}, {"TaskId", "Task Id"}, {"TaskName", "Task Name"}})
in
    #"Renamed Columns"
Status: Needs Info
Comments
v-jiascu-msft
Employee

Hi @ericleigh007,

 

Can you make it more specific please? I don't have data exactly the same with yours. So I replace your mode with the public data. You can check it out in this file

1. What's the error message exactly?

2. What's the expected result?

3. Can you share some snapshots?

 

Data Source: http://services.odata.org/northwind/northwind.svc

Code used:

let
    Source = OData.Feed(#"PWA Site URL"),
    AssignmentBaselines_table = Source{[Name="Suppliers",Signature="table"]}[Data],
//  problem -- uncomment the next two lines
    #"Filtered Rows" = Table.SelectRows(AssignmentBaselines_table, each [SupplierID] = 2),
    #"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"SupplierID","CompanyName","ContactName","ContactTitle","Address","City","Region","PostalCode","Country","Phone","Fax","HomePage"}),
//  workaround -- comment the two lines above, and uncomment this next one
//    #"Removed Other Columns" = Table.SelectColumns(AssignmentBaselines_table,{"BaselineNumber", "ProjectId", "AssignmentId", "AssignmentBaselineBudgetCost", "AssignmentBaselineCost", "AssignmentBaselineFinishDate", "AssignmentBaselineStartDate", "AssignmentBaselineWork", "ProjectName", "TaskId", "TaskName"}),
    #"Renamed Columns" = Table.RenameColumns(#"Removed Other Columns",{{"SupplierID", "Supplier ID"}, {"CompanyName", "Company Name"}, {"ContactName", "Contact Name"}, {"ContactTitle", "Contact Title"}, {"HomePage", "Home Page"}})
in
    #"Renamed Columns"

Outcome:

Bug_when_filtering_the_output_of_OData_in_a_query

 

  

Best Regards,

Dale

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
ericleigh007
Helper II

Here's the error message.   for troubleshooting purposes, I can invite you to our OData, which appears to somehow be required.   My guess is that DAX puts up with some "somewhat invalid", but valid data stored in Project Online that M isn't dealing with nicely.

 

However, as long as M isn't "filtering rows", then it seems to be happy enough processing the data.

 

powerbi M error filtered rows.png