Forum Discussion
DAX Direct Query - if text contains
- 7 years ago
I have managed to find a solution from a search for"Re: Conditional Columns or IF Conditions in Direct Query mode" from 04-30-2017. The link as below
With the resulting direct query as follows;
IF(Table[Name]="NEW"),"NEW", "OLD
This is for a New Column and helps to identify what are new and old items from a very large SQL server source
Jimmy Tao, I made the suggested change.
I am still having issue with correct DAX command, which is correct or none.
e.g.
IF (Text.Contains('Table'[Name], "NEW") then NEW else "OLD
or IF ('Table'[Name], Text.Contains ("NEW"), then NEW else OLD
or IF (CONTAINSROW('Table'[Name], "NEW") then"NEW" else OLD
or IF ('Table'[Name], CONTAINSROW ("NEW") then NEW else OLD
I have managed to find a solution from a search for"Re: Conditional Columns or IF Conditions in Direct Query mode" from 04-30-2017. The link as below
With the resulting direct query as follows;
IF(Table[Name]="NEW"),"NEW", "OLD
This is for a New Column and helps to identify what are new and old items from a very large SQL server source