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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
GAURAV7781
Helper III
Helper III

How to show slicers

Area. = Var _Selected=CONCATENATEX(ALLSELECTED('Exported Data-RGA'[Area]),'Exported Data-RGA'[Area]) Return Switch (_Selected,"W","Warehouse","S","Sales","MNRSTW","Total Returns","WS","IMS Caused")

Only when i am selecting WS its not working 

GAURAV7781_0-1600417586005.png

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @GAURAV7781 

I build a sample table and tried your measure, I found when you select WS/SW your measure _Selected will output "SW".

So in your return when output ="WS", the result is blank.

1.png

I update your measure:

Area. = 
VAR _Selected =
    ALLSELECTED ( 'Exported Data-RGA'[Area] )
VAR _CON =
    CONCATENATEX ( _Selected, 'Exported Data-RGA'[Area] )
VAR _Output =
    IF ( _CON = "SW", "WS", _CON )
RETURN
    IF (
        ISFILTERED ( 'Exported Data-RGA'[Area] ),
        SWITCH (
            _Output,
            "W", "Warehouse",
            "S", "Sales",
            "MNRSTW", "Total Returns",
            "WS", "IMS Caused"
        ),
        BLANK ()
    )

Result is as below.

Select "WS"

2.png

 

You can download the pbix file from this link: How to show slicers

 

Best Regards,

Rico Zhou

 

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

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @GAURAV7781 

I build a sample table and tried your measure, I found when you select WS/SW your measure _Selected will output "SW".

So in your return when output ="WS", the result is blank.

1.png

I update your measure:

Area. = 
VAR _Selected =
    ALLSELECTED ( 'Exported Data-RGA'[Area] )
VAR _CON =
    CONCATENATEX ( _Selected, 'Exported Data-RGA'[Area] )
VAR _Output =
    IF ( _CON = "SW", "WS", _CON )
RETURN
    IF (
        ISFILTERED ( 'Exported Data-RGA'[Area] ),
        SWITCH (
            _Output,
            "W", "Warehouse",
            "S", "Sales",
            "MNRSTW", "Total Returns",
            "WS", "IMS Caused"
        ),
        BLANK ()
    )

Result is as below.

Select "WS"

2.png

 

You can download the pbix file from this link: How to show slicers

 

Best Regards,

Rico Zhou

 

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

amitchandak
Super User
Super User

@GAURAV7781 ,

Not tested. Try like this

 

CONCATENATEX(ALLSELECTED('Exported Data-RGA'[Area]),Switch('Exported Data-RGA'[Area] ,"W","Warehouse","S","Sales","MNRSTW","Total Returns","WS","IMS Caused") )

 

CONCATENATEX(('Exported Data-RGA'[Area]),Switch('Exported Data-RGA'[Area] ,"W","Warehouse","S","Sales","MNRSTW","Total Returns","WS","IMS Caused") )

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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