I have code below but it prints out None
when I select multiple or all the items in the filter.
How to get around with this?
DynamicTitle =
"Selected Items: " &
IF(
ISBLANK(SELECTEDVALUE(TableName[ColumnName])),
"None",
CONCATENATEX(
VALUES(TableName[ColumnName]),
TableName[ColumnName],
", "
)
)
DynamicTitle =
VAR SelectedItems =
CONCATENATEX(
VALUES(TableName[ColumnName]),
TableName[ColumnName],
", "
)
RETURN
"Selected Items: " &
IF(
ISBLANK(SelectedItems),
"None",
SelectedItems
)
VALUES(TableName[ColumnName])
returns the distinct values currently selected.
CONCATENATEX()
joins them into a comma-separated string.
ISBLANK(SelectedItems)
handles the case when no values are selected, not when multiple are selected.
This way, if 1 or many items are selected, they'll be listed. If none are selected, it returns "None"
.