DAX ; Contians, Contains string

dicken

Active Member
Joined
Feb 12, 2022
Messages
292
Office Version
  1. 365
Platform
  1. Windows
Hi,
I've been tryiing out contians ; so ;

ContainM = CONTAINS( Table1, Table1[Customer], "Tom" )


Which return a true /false as expected , but I cannot get CONTAINSSTRING to work at all?
if I enter ;

Excel Formula:
  ]ContainA = CONTAINSSTRING(

The options to enter a table column as the first argument is not in intelesence


So I tried using values ;


Excel Formula:
ContainA = CONTAINSSTRING( VALUES( Table1[Customer]), "T")



Which allows me to find the correct column in but otherwise does not work. What am I doing wrong?


Richard.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
CONTAINSSTRING tells you if one text value contains another, nothing more.
 
Upvote 0
Solution
CONTAINSSTRING tells you if one text value contains another, nothing more.
Yes, it was more to do with why I couldn't get it to work, which it now is,
When I was trying this;
]
Excel Formula:
Table = 
    ROW(
        "Case 1", "AAA", 
        "Case 2", 1234,
        "Case 3", 1& "A", 
        "Case 4", 2& "B" 
    )

Then ;
Excel Formula:
ADDColum = CONTAINSSTRING( 'Table'[Case 4], "B")

The only way I could get intelisence to give me the Table [column ] option was to use VALUES, and I thought I might be misusing step,
which I may have been but seems to work now. CONTAINS worked fine.

RD
 
Upvote 0

Forum statistics

Threads
1,223,315
Messages
6,171,413
Members
452,399
Latest member
oranges

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top