# DAX equivalent of Excel CHAR() function?



## soundofspreadsheets (Feb 19, 2016)

Hi everyone,

I'm currently working on a PowerPivot where I'm trying to extract the position of a new line/carriage return in a cell containing text. In Excel, this is fairly straightforward using the CHAR() function, where CHAR(10) = line feed:

=FIND(CHAR(10), <cell with text>)

However, there doesn't seem to be an equivalent to the CHAR() function in DAX. Or at least I haven't found one yet. Am I missing something obvious? Any tips or suggestions would be greatly appreciated.

Cheers,

SoS


----------



## Matt Allington (Feb 19, 2016)

Power Pivot is a reporting tool, so it is not designed for data cleansing.  Why don't you use Power Query to do what you need to do during import?  Power Query is very powerful at this stuff.


----------



## soundofspreadsheets (Feb 19, 2016)

Thanks for the reply, Matt. I'll give Power Query a shot. Much appreciated!


----------



## ImkeF (Feb 20, 2016)

You'll find the syntax in this article: Working With CSV Files That Contain Rogue Line Breaks In Power Query And Power BI – Chris Webb's BI Blog
...Text.PositionOf(Source, "#(cr,lf)", Occurrence.All


----------



## soundofspreadsheets (Feb 20, 2016)

Wow, what a timely post. Thanks for sharing, Imke.


----------

