<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Conditionally Replace Line-Breaks with Space within the same multi-line text field in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Conditionally-Replace-Line-Breaks-with-Space-within-the-same/m-p/463695#M6543</link>
    <description>Hi folks&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;I have a multi-line text column (equivalent to nVarchar (max) ) which is getting data from SharePoint using OData connection.&lt;BR /&gt;So it's limiting me to apply easy SQL&amp;amp;nbsp;on data.&lt;BR /&gt;Each&amp;amp;nbsp;field of this text&amp;amp;nbsp;column&amp;amp;nbsp;is having multi-line comments from end users.&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;I've tried to manipulate it using a Conditional Column in Data Model of Power BI using the below formula:&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;T_Comments = IF((find(UNICHAR(10),KeyEvaluationQuestions[ExecutiveSummary],1)+1) = find(UNICHAR(46),KeyEvaluationQuestions[ExecutiveSummary],1), KeyEvaluationQuestions[ExecutiveSummary], SUBSTITUTE(KeyEvaluationQuestions[ExecutiveSummary], UNICHAR(10)," "))&lt;BR /&gt;My logic was to replace all the line breaks (UNICHAR(10)) with a Space, which are not followed by a Full-Stop (UNICHAR(46)). Otherwise, it should not change the feild values.&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;But, I think, whenever the condition is true, this formula (&lt;BR /&gt;SUBSTITUTE(KeyEvaluationQuestions[ExecutiveSummary], UNICHAR(10)," ")&lt;BR /&gt;) is working on the whole one field, not replacing the line-breaks conditionally.&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Logically it makes sense and I'm feeling the need of Loop kind of functionality in Power BI DAX,&lt;BR /&gt;which should&amp;amp;nbsp;iterate through the&amp;amp;nbsp;all contents of a field and work conditionally only where required.&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Can you please suggest me what DAX function can I use for this purpose or any other suggestion?</description>
    <pubDate>Tue, 17 Jul 2018 09:32:09 GMT</pubDate>
    <dc:creator>kamran</dc:creator>
    <dc:date>2018-07-17T09:32:09Z</dc:date>
    <item>
      <title>Conditionally Replace Line-Breaks with Space within the same multi-line text field</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Conditionally-Replace-Line-Breaks-with-Space-within-the-same/m-p/463695#M6543</link>
      <description>Hi folks&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;I have a multi-line text column (equivalent to nVarchar (max) ) which is getting data from SharePoint using OData connection.&lt;BR /&gt;So it's limiting me to apply easy SQL&amp;amp;nbsp;on data.&lt;BR /&gt;Each&amp;amp;nbsp;field of this text&amp;amp;nbsp;column&amp;amp;nbsp;is having multi-line comments from end users.&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;I've tried to manipulate it using a Conditional Column in Data Model of Power BI using the below formula:&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;T_Comments = IF((find(UNICHAR(10),KeyEvaluationQuestions[ExecutiveSummary],1)+1) = find(UNICHAR(46),KeyEvaluationQuestions[ExecutiveSummary],1), KeyEvaluationQuestions[ExecutiveSummary], SUBSTITUTE(KeyEvaluationQuestions[ExecutiveSummary], UNICHAR(10)," "))&lt;BR /&gt;My logic was to replace all the line breaks (UNICHAR(10)) with a Space, which are not followed by a Full-Stop (UNICHAR(46)). Otherwise, it should not change the feild values.&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;But, I think, whenever the condition is true, this formula (&lt;BR /&gt;SUBSTITUTE(KeyEvaluationQuestions[ExecutiveSummary], UNICHAR(10)," ")&lt;BR /&gt;) is working on the whole one field, not replacing the line-breaks conditionally.&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Logically it makes sense and I'm feeling the need of Loop kind of functionality in Power BI DAX,&lt;BR /&gt;which should&amp;amp;nbsp;iterate through the&amp;amp;nbsp;all contents of a field and work conditionally only where required.&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;Can you please suggest me what DAX function can I use for this purpose or any other suggestion?</description>
      <pubDate>Tue, 17 Jul 2018 09:32:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Conditionally-Replace-Line-Breaks-with-Space-within-the-same/m-p/463695#M6543</guid>
      <dc:creator>kamran</dc:creator>
      <dc:date>2018-07-17T09:32:09Z</dc:date>
    </item>
  </channel>
</rss>

