Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RAJRANJITHBROS
Frequent Visitor

showing multiple values selected from multiple slicers on a card visual.

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...

1 ACCEPTED 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:

AlexisOlson_0-1666369932830.png

AlexisOlson_1-1666369953174.png

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

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:

vbinbinyumsft_0-1666333017722.png

 

Table2:

vbinbinyumsft_1-1666333056405.png

 

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

Animation2.gif

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:

AlexisOlson_0-1666369932830.png

AlexisOlson_1-1666369953174.png

 

Anuja_Chaudhari_0-1706084173331.png

 

Hi,

Hope this helps.

Hema_Gupta_0-1707819192802.png

 

Anonymous
Not applicable

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.