Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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 |
Hi,
We need more details to really help you but basically, if you want to get the selectedvalue :
Get Category List (selected ones) =
VAR LstCat = DISTINCT( Products[Category] )
VAR NbCat = COUNTROWS( LstCat )
RETURN
SWITCH( TRUE() ,
NOT ISFILTERED( Products[Category] ) , "All cat displayed" ,
NbCat > 10 , "Too many cat selected (" & NbCat & " categories selected)" ,
ISFILTERED( Products[Category] ) , CONCATENATEX( LstCat , Products[Category] , ", ") )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
21 | |
14 | |
14 | |
13 | |
13 |