Forum Discussion

Libin7963's avatar
Libin7963
Icon for Helper II rankHelper II
1 year ago
Solved

Line break in address field

My source data is from Oracle Database(Direct Query) and the address field has line breaks in it where each field is in each line of the cell like below which is causing issue when I add this field to the table visual. When I add the address field to table visual all the rows disappears. Excludign this field it works fine.  I tried splitting and merging with space but it is not supported in direct query mode. Any suggestions to remove the line break please  . Below is an image from sample data

 

Addressline 1

Address line 2

City

State 

 

 

 

  • Libin7963 , Try using Power Query for this

     

    m
    let
    Source = Oracle.Database("YourOracleServer", [Query="SELECT AddressField FROM YourTable"]),
    ReplacedLineBreaks = Table.TransformColumns(Source, {{"AddressField", each Text.Replace(Text.Replace(_, "#(lf)", " "), "#(cr)", " "), type text}})
    in
    ReplacedLineBreaks

2 Replies

  • Libin7963 , Try using Power Query for this

     

    m
    let
    Source = Oracle.Database("YourOracleServer", [Query="SELECT AddressField FROM YourTable"]),
    ReplacedLineBreaks = Table.TransformColumns(Source, {{"AddressField", each Text.Replace(Text.Replace(_, "#(lf)", " "), "#(cr)", " "), type text}})
    in
    ReplacedLineBreaks

    • Libin7963's avatar
      Libin7963
      Icon for Helper II rankHelper II

      it is throwing this error , can it be in directquery mode and change line break