Forum Discussion

AshwinC's avatar
AshwinC
Frequent Visitor
4 years ago
Solved

Filter with Text Contains

Hi All,

 

I have Column which has muliple Values

 

Option TypeDate1Date 2
Option1, Option2, Option310/02/202212/02/2022
Option1, Option315/01/202216/01/2022
Option218/01/202230/01/2022
Option112/01/202230/01/2022

 

I need to create report with a Slicer of Unique Values

 

TypeCountAverage Days (Days1 to Days2)
Option 133
Option 224
Option 325

 

I need to able to summarize the table, like Average Days between Days1 and Days2, Count of Rows etc.

 

Is there a way where i can achieve this?

 

 

 

  • Hi AshwinC ,

     

    Believe the best option is to make a transformation on the query editor and split those options by row:

    This will allow to have the final result directly on your table.

     

    If this is not possible then you can try to do the following:

    • Create a disconnected table with all your options
    • Then create the following measure

     

    CountRows = 
    COUNTROWS (
        FILTER (
            ADDCOLUMNS (
                'Table (2)',
                "StringFind", CONTAINSSTRING ( 'Table (2)'[Option Type], SELECTEDVALUE ( Options[Options] ) )
            ),
            [StringFind] <> BLANK ()
        )
    )

     

     

     

    Regarding the second value you present how is it calculated?

     

     

2 Replies

  • Hi AshwinC ,

     

    Believe the best option is to make a transformation on the query editor and split those options by row:

    This will allow to have the final result directly on your table.

     

    If this is not possible then you can try to do the following:

    • Create a disconnected table with all your options
    • Then create the following measure

     

    CountRows = 
    COUNTROWS (
        FILTER (
            ADDCOLUMNS (
                'Table (2)',
                "StringFind", CONTAINSSTRING ( 'Table (2)'[Option Type], SELECTEDVALUE ( Options[Options] ) )
            ),
            [StringFind] <> BLANK ()
        )
    )

     

     

     

    Regarding the second value you present how is it calculated?

     

     

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Community Support

    Hi AshwinC ,

     

    Whether the advice given by MFelix  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


    Looking forward to your feedback.


    Best Regards,
    Henry