Forum Discussion
Sum hours only once per document by priority
The target is that, each Doc man hour only get reflected in WP table once.
priority has 1 to many relationship with workpack. each workpack has only one priority.
There are many workpacks with priority 1 or priority 2 . and each document may get repeated multiple time in the middle table against different work pack. However, I want the man hour for each document only get reflected once in the middle table and against the workpack which has the lowest priority. Hope I answered your question
- Fowmy2 years ago
Super User
amirghaderi
I created a calculated column to get the desired results, please check.Result = IF( CALCULATE( MIN( Table31[Priority] ) , ALLEXCEPT( Table31 , Table31[Doc List] ) ) = Table31[Priority] && CALCULATE( MIN( Table31[Work pack] ) , ALLEXCEPT( Table31 , Table31[Doc List] ) ) = Table31[Work pack], RELATED(Table32[Ramaining Hours]) )- amirghaderi2 years ago
Helper IV
The result comes blank in the below case.
Min1 is your formula first part, Min2 is your formula second part. there is no record with both to be True. So, it comes blank result.
I do understand min1 which check the lowest priority. However, I dont understand what is the second Min. WP is a text column. I expect to see the result against one of the top 4 priority order 6 (does not matter which one.
- Fowmy2 years ago
Super User
amirghaderi
It seems you're referring to a situation where there's a need to calculate results when the document list and priorities are the same, like Doc 2 and Priority 2. In this scenario, you don't want to display the remaining hours for both WP2 and WP3.
In this case, since Doc 2 and Priority 2 are the same, we want to show only one entry. We can use a function, let's say MIN, to pick one of the remaining hours