Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

!Creating a measure referencing other measures

Hi Team,    I'm trying to create a measure using an already created measure to calculate an allocation percentage. I have a list of child contracts that roll up into parent contracts (some have no ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous,

    #1, You can try to use the following formula to calculate active contract id.

    Active Percent =
    CALCULATE (
        COUNT ( Table[Contract ID] ),
        FILTER ( ALLSELECTED ( Table ), [Status] = "Active" ),
        VALUES ( Table[Parent Contract] )
    )

    #2, You can remove the allselected function to limit the calculation on current row content and invoke the above measure results.

    Allocation of Parent Percent =
    DIVIDE (
        CALCULATE (
            COUNT ( Table[Contract ID] ),
            FILTER ( Table, [Status] = "Active" ),
            VALUES ( Table[Parent Contract] )
        ),
        [Active Percent],
        0
    )

    Regards,

    Xiaoxin Sheng