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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Bob639
Regular Visitor

Multiple choice segment

Hello

I created a multiple choice segment.

I am looking to define by a measure that they are the elements to select in the segment.

I created the following measurement that only works if the choice is single but not multiple.

Select_Bat =
VAR _Selected = SELECTEDVALUE('Bat'[Bat])
RETURN
    IF(
        ISBLANK(_Selected);
        "No value selected";
        CONCATENATEX(
            Batiment;
            _Selected;
            ", "
        )
    )

Do you have a solution ?

Kind regards.

1 ACCEPTED SOLUTION

@Bob639 

 

Use ISFILTERED to check if there's a selection in the slicer

 

 

Select_Bat = 

VAR _Selected = VALUES('Table'[Bat ID])

RETURN

IF( 

    ISFILTERED('Table'[Bat ID]), CONCATENATEX(_Selected, 'Table'[Bat ID], ", "),
    
    "No value selected"
    
)

 

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Bob639 ,

 

Based on your description, I created these data.

vkaiyuemsft_0-1730276265669.png

 

Create the measure.

Select_Bat =
VAR _Selected = VALUES('Table'[Bat ID])
RETURN
IF(
COUNTROWS(_Selected) = 0,
"No value selected",
CONCATENATEX(
_Selected,
'Table'[Bat ID],
", "

)
)

 

The final result is shown below. More details can be found in the attachment.

vkaiyuemsft_1-1730276292756.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Hello @Anonymous ,

Thank you for this info.

However, it works except for a choice of zero segments via the "Select all" command, it displays them all.

Kind regards.

Bob639_0-1730280153160.pngBob639_1-1730280176903.png

 

@Bob639 

 

Use ISFILTERED to check if there's a selection in the slicer

 

 

Select_Bat = 

VAR _Selected = VALUES('Table'[Bat ID])

RETURN

IF( 

    ISFILTERED('Table'[Bat ID]), CONCATENATEX(_Selected, 'Table'[Bat ID], ", "),
    
    "No value selected"
    
)

 

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


FreemanZ
Super User
Super User

hi @Bob639 ,

 

Try like:

Select_Bat =

VAR _Selected = VALUES('Bat'[Bat])

RETURN

    IF(

        ISBLANK(_Selected);

        "No value selected";

        CONCATENATEX(

           Selected;

            Bat[bat];

            ", "

        )

    )

Selva-Salimi
Super User
Super User

Hi @Bob639 

 

I think you need to use "Values" instead of "selectedvalue".

 

If this post helps, then I would appreciate a thumbs up  and mark it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.