Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi
I am looking to display the Countries listed depending on what food items are selected in a slicer (where multiple options can be selected).
Say 'Hot Dogs', 'Corn dogs' and 'Stew' are selected, I want a measure to say something like this:
'Corn Dogs' and 'Hot dogs' found in 'America'. Count of 2.
'Stew' is found in Ireland. Count of 1.
Is there any way to search on a table like this and display the items in a similar format?
Thanks in advance,
Laura
See table 'CountryFood' below.
Countries | Food |
America | Hot dogs |
America | Corn dogs |
America | Bigmacs |
Ireland | Stew |
Ireland | Cabbage and bacon |
Solved! Go to Solution.
Hi @Lauraeire_81 Try this please
SelectedFoodSummary =
VAR SelectedFoods = VALUES('CountryFood'[Food])
VAR Result =
CONCATENATEX(
SELECTCOLUMNS(
FILTER('CountryFood', 'CountryFood'[Food] IN SelectedFoods),
"Summary",
'CountryFood'[Food] & " found in " & 'CountryFood'[Countries] & "."
),
[Summary],
" Count of " & COUNTROWS(FILTER('CountryFood', 'CountryFood'[Food] IN SelectedFoods)) & ". ",
UNICHAR(10)
)
RETURN Result
we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra.
Thanks @Akash_Varuna for Addressing the issue.
we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If the above response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Regards,
Chaithra.
Hi @Lauraeire_81 Try this please
SelectedFoodSummary =
VAR SelectedFoods = VALUES('CountryFood'[Food])
VAR Result =
CONCATENATEX(
SELECTCOLUMNS(
FILTER('CountryFood', 'CountryFood'[Food] IN SelectedFoods),
"Summary",
'CountryFood'[Food] & " found in " & 'CountryFood'[Countries] & "."
),
[Summary],
" Count of " & COUNTROWS(FILTER('CountryFood', 'CountryFood'[Food] IN SelectedFoods)) & ". ",
UNICHAR(10)
)
RETURN Result