Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Divide 2 columns based on a common value

I want to perform the following division from columns in two separate tables: Failure Ratio= DIVIDE(     COUNTA('Failure Table'[Distinct Install to First Failure]),     COUNTA('All Devices By Re...
  • tamerj1's avatar
    tamerj1
    4 years ago

    Anonymous 
    Please try

    Failure Ratio =
    VAR CurrentYear =
        SELECTEDVALUE ( 'All Devices By Region'[Install Year] )
    RETURN
        DIVIDE (
            CALCULATE (
                COUNTA ( 'Failure Table'[Distinct Install to First Failure] ),
                YEAR ( 'Failure Table'[Install Day] ) = CurrentYear
            ),
            COUNTA ( 'All Devices By Region'[Install Year] )
        )