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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
designertechno
Frequent Visitor

Calculated column reference the wrong column data


I'v defined a calcuated column as below:

ActualWorkTest = AssignmentTimephasedDataSet[Assignment Actual Work]


But that column actually references the Assignment Combined Work column instead. How can that happen?
I've looked at the underlying query but cannot see any issues:

let
    Source = OData.Feed(#"PWA Site URL" & "/_api/ProjectData/[en-us]"),
    AssignmentTimephasedDataSet_table = Source{[Name="AssignmentTimephasedDataSet",Signature="table"]}[Data],
    TableFilter = Table.SelectRows(AssignmentTimephasedDataSet_table, each ([ProjectName] <> "TimesheetAdmin"))),
    #"Removed Other Columns" = Table.SelectColumns(FremanFilter,{"ProjectId", "AssignmentId", "TimeByDay", "AssignmentActualCost", "AssignmentActualWork", "AssignmentBudgetCost", "AssignmentCombinedWork", "AssignmentCost", "AssignmentRemainingCost", "AssignmentRemainingWork", "AssignmentWork", "ProjectName", "ResourceId", "TaskId", "TaskIsActive", "TaskName"}),
    #"Renamed Columns" = Table.RenameColumns(#"Removed Other Columns",{{"ProjectId", "Project Id"}, {"AssignmentId", "Assignment Id"}, {"TimeByDay", "Time By Day"}, {"AssignmentActualCost", "Assignment Actual Cost"}, {"AssignmentActualWork", "Assignment Actual Work"}, {"AssignmentBudgetCost", "Assignment Budget Cost"}, {"AssignmentCombinedWork", "Assignment Combined Work"}, {"AssignmentCost", "Assignment Cost"}, {"AssignmentRemainingCost", "Assignment Remaining Cost"}, {"AssignmentRemainingWork", "Assignment Remaining Work"}, {"AssignmentWork", "Assignment Work"}, {"ProjectName", "Project Name"}, {"ResourceId", "Resource Id"}, {"TaskId", "Task Id"}, {"TaskIsActive", "Task Is Active"}, {"TaskName", "Task Name"}}),
    #"Added Index" = Table.AddIndexColumn(#"Renamed Columns", "Index", 1, 1),
    #"Renamed Columns1" = Table.RenameColumns(#"Added Index",{{"Index", "RowIndex"}}),
    #"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns1",{"Project Id", "Project Name", "Assignment Id", "Resource Id", "Task Id", "Task Name", "Task Is Active", "Time By Day", "Assignment Actual Cost", "Assignment Actual Work", "Assignment Budget Cost", "Assignment Combined Work", "Assignment Cost", "Assignment Remaining Cost", "Assignment Remaining Work", "Assignment Work", "RowIndex"}),
    #"Added Custom" = Table.AddColumn(#"Reordered Columns", "Assignment Start Date", each [Time By Day]),
    #"Extracted Date" = Table.TransformColumns(#"Added Custom",{{"Assignment Start Date", DateTime.Date, type date}}),
    #"Reordered Columns1" = Table.ReorderColumns(#"Extracted Date",{"Project Id", "Project Name", "Assignment Id", "Resource Id", "Task Id", "Task Name", "Task Is Active", "Time By Day", "Assignment Start Date", "Assignment Actual Cost", "Assignment Actual Work", "Assignment Budget Cost", "Assignment Combined Work", "Assignment Cost", "Assignment Remaining Cost", "Assignment Remaining Work", "Assignment Work", "RowIndex"})
in
    #"Reordered Columns1"




 

1 REPLY 1
v-lili6-msft
Community Support
Community Support

Hi@ designertechno

The underlying query is used for processing data sources ,So calculate column won’t be seen in the Edit Queries,

Please share your pbix and some screenshot for us. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.

 

 

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.