Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How do I retrieve values from non-related table | Lookupvalue help?

I am creating a project management table that shows project forecasted hours (planned hours), project actual hours worked, and a column for the difference.  The forecast hours and actual hours tables have no relationship and show many-to-many when trying to connect them. Using the forecast table, I've tried pulling the actual hours over using functions like lookupvalue, but I either get errors or the actual hours values in the table I make are incorrect. I tried searching the forums some, but when trying some of the things in the comments, I couldn't get them to work (such as lookupvalue, merged queries) whether that's me not understanding or the data being too different for me to grasp how the dax could work in my tables.

 

Wanted result:

WorkerProjectForecasted HoursActual HoursDifference
Andy Man001 Project211
Andy Man002 Project220
Bob Bob001 Project312
Charlie Man001 Project532

 

Below is my pbix file with mockup data that is close to my actual data. I've created the relationships and in the forecast hours table I left in the column where I tried lookup value and failed.

 

Link to my pbix file

https://www.dropbox.com/s/7dzst33jwz1th5j/Project%20Forecast%20and%20Actual%20Hours%20-%20Mockup.pbix?dl=0

 

Thank you in advance for any help with this.

  • Anonymous's avatar
    Anonymous
    4 years ago

    Anonymous -  You have two fact tables.  Yes they are not related directly to each other, but there can be using Bridging Dimension like "Worker" and "Calendar".  There table will apply filter context to the two fact tables.  You need to create tables for each other dimension - role, project.  Then just find the Actual and Plan columns, and create a measure table.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous -  You have two fact tables.  Yes they are not related directly to each other, but there can be using Bridging Dimension like "Worker" and "Calendar".  There table will apply filter context to the two fact tables.  You need to create tables for each other dimension - role, project.  Then just find the Actual and Plan columns, and create a measure table.