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 September 15. Request your voucher.

Reply
Vishwamber
Frequent Visitor

Slicer for multi cell value

I have excell sheet which has multiple columns, one column is having csv value, That I needed to use for slicer.

For an eg .

Sr NoTC IDResuly 
1TC95524 r1
2TC269975 r2,r4,r5,r6
3TC206228Passr2,r4,r6,r1
4TC206230Failr2,r4,r6,r2
5TC206242Passr2,r4,r6,r3
6TC206243Passr2,r4,r6,r4
7TC206244Passr2,r4,r6,r5
8TC206245Passr2,r4,r6,r6
9TC206246Passr2,r4,r6,r7
10TC207576Passr2,r4,r6,r8
11TC207577Failr2,r4,r6,r9
12TC207578Passr2,r4,r6,r10
13TC207579Passr2,r4,r6,r11
14TC207581Passr2,r4,r6,r12
15TC207582No resultr2,r4,r6,r13
16TC207583Passr2,r4,r6,r14
17TC207584Passr2,r4,r6,r15
18TC207585Passr2,r4,r6,r16
19TC207586Passr2,r4,r6,r17
20TC207587Passr2,r4,r6,r18
21TC207588Passr2,r4,r24
22TC207589Failr7

 

  

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

Hi @Vishwamber ,

 

Based on the sample and description you provided, Please try the following steps:
My Sample:

vweiyan1msft_0-1710739447511.png

1.You can create a calcualted table.

Table 2 = 
DATATABLE (
    "Value", STRING,
    "Index", INTEGER,
    {
        { "r1", 1 },
        { "r2", 2 },
        { "r3", 3 },
        { "r4", 4 },
        { "r5", 5 },
        { "r6", 6 },
        { "r7", 7 },
        { "r8", 8 },
        { "r9", 9 },
        { "r10", 10 },
        { "r11", 11 },
        { "r12", 12 },
        { "r13", 13 },
        { "r14", 14 },
        { "r15", 15 },
        { "r16", 16 },
        { "r17", 17 },
        { "r18", 18 },
        { "r19", 19 },
        { "r20", 20 },
        { "r21", 21 },
        { "r22", 22 },
        { "r23", 23 },
        { "r24", 24 }
    }
)

vweiyan1msft_1-1710739491435.png

2. Use the following code to create a measure.

Contains_r = 
VAR Within_text =
    SELECTEDVALUE ( 'Table'[y] ) & ","
VAR Find_text =
    SELECTEDVALUE ( 'Table 2'[Value], BLANK () ) & ","
RETURN
    IF ( CONTAINSSTRING ( Within_text, Find_text ), 1, 0 )

3. Select your visual object, put the measure in the "Filters on this visual" section, and filter it by "Measure is 1".

vweiyan1msft_2-1710739531520.png

The field of the slicer is from Table 2. When you select "r1" in the slicer, Result is as below.

vweiyan1msft_3-1710739549506.png

Is this the result you expect?
For further detail, please find attachment.


Best Regards,
Yulia Yan


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

3 REPLIES 3
v-weiyan1-msft
Community Support
Community Support

Hi @Vishwamber ,

 

Based on the sample and description you provided, Please try the following steps:
My Sample:

vweiyan1msft_0-1710739447511.png

1.You can create a calcualted table.

Table 2 = 
DATATABLE (
    "Value", STRING,
    "Index", INTEGER,
    {
        { "r1", 1 },
        { "r2", 2 },
        { "r3", 3 },
        { "r4", 4 },
        { "r5", 5 },
        { "r6", 6 },
        { "r7", 7 },
        { "r8", 8 },
        { "r9", 9 },
        { "r10", 10 },
        { "r11", 11 },
        { "r12", 12 },
        { "r13", 13 },
        { "r14", 14 },
        { "r15", 15 },
        { "r16", 16 },
        { "r17", 17 },
        { "r18", 18 },
        { "r19", 19 },
        { "r20", 20 },
        { "r21", 21 },
        { "r22", 22 },
        { "r23", 23 },
        { "r24", 24 }
    }
)

vweiyan1msft_1-1710739491435.png

2. Use the following code to create a measure.

Contains_r = 
VAR Within_text =
    SELECTEDVALUE ( 'Table'[y] ) & ","
VAR Find_text =
    SELECTEDVALUE ( 'Table 2'[Value], BLANK () ) & ","
RETURN
    IF ( CONTAINSSTRING ( Within_text, Find_text ), 1, 0 )

3. Select your visual object, put the measure in the "Filters on this visual" section, and filter it by "Measure is 1".

vweiyan1msft_2-1710739531520.png

The field of the slicer is from Table 2. When you select "r1" in the slicer, Result is as below.

vweiyan1msft_3-1710739549506.png

Is this the result you expect?
For further detail, please find attachment.


Best Regards,
Yulia Yan


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

Vishwamber
Frequent Visitor

I have updated table, I want to create filter which has unique value r1 to r24, if I slect select r1 it should filter row containing r1.

Ritaf1983
Super User
Super User

Hi @Vishwamber 
Could you please demonstrate what you mean by 'CSV value'? By default, any column can be used as a slicer, so the question is not entirely clear.

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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