
VAR EndYear = 2017
VAR CurrentCompany = SELECTEDVALUE(COMPANIES[COMPANYID])
VAR Industry = SELECTEDVALUE(COMPANIES[INDUSTRY])
RETURN
    CALCULATE(
        SUM(STATEMENTDATA[VALUE]),
        STATEMENTLINES[LINEITEM] = "REVENUE",
        DATES[Year] = EndYear,
        COMPANIES[INDUSTRY] = Industry,
        COMPANIES[COMPANYID] <> CurrentCompany
    )
