Forum Discussion
Related function returns unexpected results
I'm trying to find the remaining hours available (Hours Remaining) by subtracting "Total Hours" in the CDTLaborView table from "Total Hours Allocated" in the Financials table using the following:
Hours Remaining = Related(Financials[Total Hours Allocated]) - CDTLaborView[Total Hours]
The results were not as expected (see below) so I tried using just the related function (Hours Allocated Check) and realized its not working the way I expected.
What am I doing wrong, whats the fix or is there a better way?
| Total Hours Allocated | Total Hours | Hours Remaining | Hours Allocated Check |
| 3,621 | 2,763 | 3,089,206 | 3,091,969 |
| 1,032 | 795 | 359,530 | 360,325 |
| 958 | 703 | 263,774 | 264,478 |
8 Replies
- Data-estDogResolver II
What is the relationship between the two tables? Model view screen shot?
- smcknezie04Frequent Visitor
Data-estDog The relationship is Many to One, CDTLaborView is many and Financials is One.
- Data-estDogResolver II
I am going to need more information/context here. A 1 to * type doesn't tell me much.
This post give some great tips on how to present your situation so we can best help: How to Get Your Question Answered Quickly - Microsoft Fabric Community
- smcknezie04Frequent Visitor
They are linked via WBSID which is a combination of the WBS# fields so we could create a relationship between the tables.