<?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 Re: Remove symbol at the beginning of a column if it exists in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2952049#M97934</link>
    <description>&lt;P&gt;I also found a way to do it in DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;CleanUp = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;LEFT&lt;/SPAN&gt;&lt;SPAN&gt;([Column], &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;"-"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;MID&lt;/SPAN&gt;&lt;SPAN&gt;([Column], &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;LEN&lt;/SPAN&gt;&lt;SPAN&gt;([Column])),[Column])&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 06 Dec 2022 17:02:41 GMT</pubDate>
    <dc:creator>Chris2016</dc:creator>
    <dc:date>2022-12-06T17:02:41Z</dc:date>
    <item>
      <title>Remove symbol at the beginning of a column if it exists</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2951823#M97910</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some help removing a symbol ("-") if it exists in the beginning of a column value, but keep it if it exists elswhere in the value (not at the beginning).&lt;BR /&gt;&lt;BR /&gt;E.g.:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Column&lt;/TD&gt;&lt;TD&gt;Result Column&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;-alex&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;alex&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;john&lt;/TD&gt;&lt;TD&gt;john&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;a-albert&lt;/TD&gt;&lt;TD&gt;a-albert&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;-dan&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#339966"&gt;dan&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;b-judy&lt;/TD&gt;&lt;TD&gt;b-judy&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Any thoughts?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 15:06:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2951823#M97910</guid>
      <dc:creator>Chris2016</dc:creator>
      <dc:date>2022-12-06T15:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Remove symbol at the beginning of a column if it exists</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2951929#M97921</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460974" data-lia-user-login="Chris2016" class="lia-mention lia-mention-user"&gt;Chris2016&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used a series of steps in "Power query".&lt;BR /&gt;&lt;BR /&gt;please find below the query code with all the steps:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W0s1LzE1VitWJVipJLS7RLUBiFujqKsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Test = _t]),&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(Source,{{"Test", type text}}),&lt;BR /&gt;#"Inserted First Characters" = Table.AddColumn(#"Changed Type", "First Characters", each Text.Start([Test], 1), type text),&lt;BR /&gt;#"Extracted Text Range" = Table.TransformColumns(#"Inserted First Characters", {{"Test", each Text.Middle(_, 1, 10000000), type text}}),&lt;BR /&gt;#"Replaced Value" = Table.ReplaceValue(#"Extracted Text Range","-","",Replacer.ReplaceText,{"First Characters"}),&lt;BR /&gt;#"Merged Columns" = Table.CombineColumns(#"Replaced Value",{"First Characters", "Test"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Merged")&lt;BR /&gt;in&lt;BR /&gt;#"Merged Columns"&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 15:51:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2951929#M97921</guid>
      <dc:creator>Uspace87</dc:creator>
      <dc:date>2022-12-06T15:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Remove symbol at the beginning of a column if it exists</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2952037#M97932</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="472983" data-lia-user-login="Uspace87" class="lia-mention lia-mention-user"&gt;Uspace87&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot, this helps. Can you let me know how you added the "Inserted First Characters" step?&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 16:56:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2952037#M97932</guid>
      <dc:creator>Chris2016</dc:creator>
      <dc:date>2022-12-06T16:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Remove symbol at the beginning of a column if it exists</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2952049#M97934</link>
      <description>&lt;P&gt;I also found a way to do it in DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;CleanUp = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;LEFT&lt;/SPAN&gt;&lt;SPAN&gt;([Column], &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)=&lt;/SPAN&gt;&lt;SPAN&gt;"-"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;MID&lt;/SPAN&gt;&lt;SPAN&gt;([Column], &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;LEN&lt;/SPAN&gt;&lt;SPAN&gt;([Column])),[Column])&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Dec 2022 17:02:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2952049#M97934</guid>
      <dc:creator>Chris2016</dc:creator>
      <dc:date>2022-12-06T17:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Remove symbol at the beginning of a column if it exists</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2953359#M97998</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460974" data-lia-user-login="Chris2016" class="lia-mention lia-mention-user"&gt;Chris2016&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need yo use "Add column" and then "Extract first Char"&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 08:07:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2953359#M97998</guid>
      <dc:creator>Uspace87</dc:creator>
      <dc:date>2022-12-07T08:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Remove symbol at the beginning of a column if it exists</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2953696#M98036</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 10:14:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Remove-symbol-at-the-beginning-of-a-column-if-it-exists/m-p/2953696#M98036</guid>
      <dc:creator>Chris2016</dc:creator>
      <dc:date>2022-12-07T10:14:10Z</dc:date>
    </item>
  </channel>
</rss>

