Forum Discussion

Vishwamber's avatar
Vishwamber
Frequent Visitor
2 years ago
Solved

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 No TC ID Resuly   1 TC95524   r1 2 TC269975   r2,r4...
  • v-weiyan1-msft's avatar
    2 years ago

    Hi Vishwamber ,

     

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

    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 }
        }
    )
    

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

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

    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.