Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I have a situation here where I need to show multiple values selected from multiple sicers in a card visual.
multiple values of same slicer should be seperated by ","and multiple values from multiple slicers should be seperated by "|".
for example, if i select INDIA and USA from country slicer, result is INDIA,USA
if i select INDIA and USA from country slicer and 2021,2022 from year slicer ,result is INDIA,USA |2021,2022
if no value selected from any slicer, result is "not selected"
thanks in advance...
Solved! Go to Solution.
@RAJRANJITHBROS Try @Anonymous's file with this measure instead:
Measure = 
VAR Countries = CONCATENATEX ( DISTINCT ( 'Table'[Country] ), [Country], "," )
VAR Years     = CONCATENATEX ( DISTINCT ( 'Table 2'[Year] ), [Year], "," )
RETURN
    SWITCH (
        TRUE(),
        ISFILTERED ( 'Table'[Country] ) && ISFILTERED ( 'Table 2'[Year] ), Countries & "|" & Years,
        ISFILTERED ( 'Table'[Country] ), Countries,
        ISFILTERED ( 'Table 2'[Year] ), Years,
        "No selection"
    )Examples:
 
					
				
		
Hi @RAJRANJITHBROS ,
So far , for Power BI slicer visual, we couldn't get the multiple selected value from slicer, we could only get the single selected value.
For get the single selected value from slicer, please try below steps:
1. below is my test table
Table:
Table2:
2. create a measure with below dax formula
Measure =
VAR cur_country =
    SELECTEDVALUE ( 'Table'[Country] )
VAR cur_year =
    SELECTEDVALUE ( 'Table 2'[Year] )
VAR _val = cur_country & "|" & cur_year
VAR _a =
    HASONEVALUE ( 'Table'[Country] )
VAR _b =
    HASONEVALUE ( 'Table 2'[Year] )
RETURN
    IF ( _a && _b = TRUE (), _val, "No Selected" )
3. add two slicer with table fields, and add a card visual with measure
Please refer the attached .pbix file.
Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@RAJRANJITHBROS Try @Anonymous's file with this measure instead:
Measure = 
VAR Countries = CONCATENATEX ( DISTINCT ( 'Table'[Country] ), [Country], "," )
VAR Years     = CONCATENATEX ( DISTINCT ( 'Table 2'[Year] ), [Year], "," )
RETURN
    SWITCH (
        TRUE(),
        ISFILTERED ( 'Table'[Country] ) && ISFILTERED ( 'Table 2'[Year] ), Countries & "|" & Years,
        ISFILTERED ( 'Table'[Country] ), Countries,
        ISFILTERED ( 'Table 2'[Year] ), Years,
        "No selection"
    )Examples:
Hi,
Hope this helps.
Hi @AlexisOlson ,
Thank you for the correction, I didn't realize the function "concatenatex" had such a function.
Best regards,
Community Support Team_ Binbin Yu
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 85 | |
| 49 | |
| 36 | |
| 31 | |
| 30 |