Forum Discussion

Quenjo's avatar
Quenjo
Helper II
3 years ago
Solved

Divide two fields from different table to calculate rentability

Hi community,   I have the following situation :     First column here represents a task, second column the effective time spent on the task and the third column represents the time that w...
  • Thejeswar's avatar
    Thejeswar
    3 years ago

    Hi Quenjo ,

    Try using it this way

    Rentabilité(100%) = 
    
    VAR resultat = IF (ISBLANK(SUM('change_task'[duration])), BLANK(), DIVIDE(SUM('otp'[Forfait du projet(H)]), SUM('change_task'[duration])) -1 )
    RETURN
        SWITCH (
            TRUE (),
            ISINSCOPE ( change_task[number] ), BLANK (),
            ISINSCOPE ( otp[u_number] ), resultat,
            ISINSCOPE ( company[name] ), resultat,
            resultat
        )