Forum Discussion

manutejedor's avatar
manutejedor
Frequent Visitor
7 years ago
Solved

SUM values by higher aggregation

Hi! I have a very simple sample of data with two tables: "his_prod" and "his_prod_op". "His_prod" is linked to "his_prod_op" by a "one to many" relationship on the field "Task". In the table "his_pro...
  • v-yulgu-msft's avatar
    7 years ago

    Hi manutejedor,

     

    LivioLanzo's suggestion works great. But you can create a simpler one, without adding an extra Person table.

    Total duration =
    IF (
        COUNTROWS ( his_prod_op ),
        CALCULATE ( SUM ( his_prod[Duration] ), ALLSELECTED ( his_prod_op[Person] ) )
    )

    Best regards,

    Yuliana Gu