ladder_ilr_2015 =
VAR logicTest =
COUNTROWS(DISTINCT(
FILTER(
ALLSELECTED(YEARS[YEAR]),
YEARS[YEAR] =2015 )
)
) = 1
VAR TypeTest =
COUNTROWS(DISTINCT(
FILTER(
ALLSELECTED('Type'[Type]),
'Type'[Type] ="Ladder" )
)
) = 1
return
IF(
AND(logicTest,TypeTest),
CALCULATE(
'Ladder ILR'[Ladder ILR],
final_data[yoa_attrition] = "2015"),
BLANK()
)
 
 
 
for this to work, you need to have an unrelated table for year and type, then we capture the selection from type and year and provide the measure in the chart if the selections
matches our fliter, otherwise blank will be returned and no measure will be shown on the screen
 
 
 
 
 
 
 
VAR logicTest = 
COUNTROWS(DISTINCT(
    FILTER(
        ALLSELECTED(YEARS[YEAR]),
        YEARS[YEAR] =2020 )
                   )
        ) = 1
VAR TypeTest = 
COUNTROWS(DISTINCT(
    FILTER(
        ALLSELECTED('Type'[Type]),
        'Type'[Type] ="Total ILR" )
                   )
        ) = 1
var adjustType = SELECTEDVALUE('include cat'[Type])
return 
IF(
    AND(logicTest,TypeTest),
        SWITCH(adjustType,
            "Including CATs",
            CALCULATE(
                'Total ILR'[Total ILR],
                final_data[yoa_attrition] = "2020"),
            "Excluding CATs",
            CALCULATE(
                'Total ILR'[ILR (excl. cat)],
                final_data[yoa_attrition] = "2020"),
            "Excluding Specifics",
            CALCULATE(
                'Total ILR'[Total ILR],
                final_data[yoa_attrition] = "2020")),
        BLANK()
    )