Forum Discussion

amirghaderi's avatar
amirghaderi
Helper IV
2 years ago

Sum hours only once per document by priority

I have three tables as below. in the middle table I want to see the man hour only is shown once per document in the report and is shown against the line which has the highest priority, 1.

For example Doc1 has been repeated multiple times in the middle table. However I want to see the hours for WP1 which has priority1

 

Any idea how this can be done?

 

 

 

 

6 Replies

  • amirghaderi 

    How to handle it for Doc 2 where the priority (2)  appears twice, in this case the difference the Work Pack. How to identify which work pack to consider first?


  • 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

    • Fowmy's avatar
      Fowmy
      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])
      )

       

       








      • amirghaderi's avatar
        amirghaderi
        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.