Forum Discussion

AmudhaKumaran's avatar
5 years ago
Solved

DAX using CONTAINSSTRING

Hi Team

 

I tried to Calculate a sum by using CONTAINSSTRING filter as shown below. But this code throws error. Please help.

 

Measure =

CALCULATE (

    SUM (Table[Col1] ),

    FILTER (

        ALL (Table[Col2] ),

        CONTAINSSTRING (Table[Col2], "abc" )

    ) * 200000

)

 

Error:

FILTER is used in TRUE/FALSE expression. This is not allowed.

  • What do you expect to get when you multiply a table by 200000?

     

    Do you get the same error without that multiplier?

2 Replies

  • What do you expect to get when you multiply a table by 200000?

     

    Do you get the same error without that multiplier?

    • AmudhaKumaran's avatar
      AmudhaKumaran
      Helper I

      Thanks AlexisOlson . With your hint, I troubleshooted it. I have misplaced that multiplier. Not getting any error now.