Forum Discussion

gilbertendaya's avatar
gilbertendaya
Helper IV
5 years ago
Solved

Remove in matrix table if word Fallback is present

Hi Team,

 

I would like to ask for  your assistance on how to filter out the results if the column contains the word "Fallback" in matrix table.

see below

 

amitchandak  ImkeF Tahreem24 

 

IntentName is the column and CountAllIntent is a measure.
Thank you.

 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi gilbertendaya ,

    According to my understand , you want to remove the rows when the values of Intent Name contains Fallback,right?

    You could use the CONTAINSSTRING() function like this:

    countAll=
    IF (
        CONTAINSSTRING ( SELECTEDVALUE ( Table1[IntentName] ), "Fallback" ),
        BLANK (),
        SUM ( Table1[Value] )
    )

     My visualization looks like this:

    Did I answer your question ? Please mark my reply as solution. Thank you very much.

    If not, please upload some insensitive data samples and expected output.

     

    Best Regards,

    Eyelyn Qin

     

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    gilbertendaya So maybe:

    Measure = 
      VAR __Calc = [CountAllIntent]
    RETURN
      IF(SEARCH("Fallback",MAX([IntentName),,0)>0,BLANK(),__Calc)
  • gilbertendaya , Try a measure like

    Measure =
    countx(countrows(Table), filter(Table,search("Fallback",Table[IntentName],,0)>0))

    or add filter to your existing measures 

  • gilbertendaya ,

    You can also try using CONTAINS dax:

    Column = IF(SEARCH("Fallback",Table[IntentName],1,0)>0,CountAllIntent,0)
     
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi gilbertendaya ,

    According to my understand , you want to remove the rows when the values of Intent Name contains Fallback,right?

    You could use the CONTAINSSTRING() function like this:

    countAll=
    IF (
        CONTAINSSTRING ( SELECTEDVALUE ( Table1[IntentName] ), "Fallback" ),
        BLANK (),
        SUM ( Table1[Value] )
    )

     My visualization looks like this:

    Did I answer your question ? Please mark my reply as solution. Thank you very much.

    If not, please upload some insensitive data samples and expected output.

     

    Best Regards,

    Eyelyn Qin