VALUES('Combination'[Requirement]) gives you a table with all the Requirement values in the Combination table.
If you want to exclude certain result from that table, you need to apply a filter to that table.
You have two options:
Option 1:
VAR tbl_values = CALCULATETABLE(VALUES('Combination'[Requirement]),
'Combination'[Expiration Date] = BLANK() ||
'Combination'[Expiration Date] < TODAY())
Option 2:
VAR tbl_filtered = FILTER('Combination',
'Combination'[Expiration Date] = BLANK() ||
'Combination'[Expiration Date] < TODAY())
Then you can replace the VALUES in your measure
List of Requirement values =
VAR __DISTINCT_VALUES_COUNT = DISTINCTCOUNT('Combination'[Requirement])
VAR __MAX_VALUES_TO_SHOW = 90
VAR tbl_filtered = FILTER('Combination',
'Combination'[Expiration Date] = BLANK() ||
'Combination'[Expiration Date] < TODAY())
RETURN
IF(
__DISTINCT_VALUES_COUNT > __MAX_VALUES_TO_SHOW,
CONCATENATE(
CONCATENATEX(
TOPN(
__MAX_VALUES_TO_SHOW,
tbl_filtered,
'Combination'[Requirement],
ASC
),
'Combination'[Requirement],
", ",
'Combination'[Requirement],
ASC
),
", etc."
),
CONCATENATEX(
tbl_filtered,
'Combination'[Requirement],
", ",
'Combination'[Requirement],
ASC
)
)
Unlock the Power of Data Visualization with Our Comprehensive Power BI Course online!