<?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: Convert Thousands(K) into Millinons(M) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2456746#M66315</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="377256" data-lia-user-login="Sathya141" class="lia-mention lia-mention-user"&gt;Sathya141&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your screenshot, I know [Size] column is in TEXT format. If you want to convert "K" by "M" you can try replace function in Power Query Editor.&lt;/P&gt;
&lt;P&gt;"Right Click" on [Size] &amp;gt; "Replace Values"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Replace "K" with "M"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2022 08:05:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-04-14T08:05:41Z</dc:date>
    <item>
      <title>Convert Thousands(K) into Millinons(M)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2450016#M65900</link>
      <description>&lt;P&gt;My data have a column(downloads) where the values are shown from "1"(ONLY 0ne) to 99M (99millions) including "K" (thousands) also. I want to convert "k" (thousands) into "M" (millions) &lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;OR&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt; convert "M" (millions) into "k" (thousands).&lt;/P&gt;&lt;P&gt;Help me to find the solution. Thanks in advance.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sathya Chitte.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 15:43:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2450016#M65900</guid>
      <dc:creator>Sathya141</dc:creator>
      <dc:date>2022-04-11T15:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Thousands(K) into Millinons(M)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2450100#M65905</link>
      <description>&lt;P&gt;Too little detail to go on.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2022 16:14:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2450100#M65905</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-04-11T16:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Thousands(K) into Millinons(M)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2453993#M66148</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;in the "Size" column, I want to convert thousands (value in "K") to millions(values in "M"). can you help me to get the output. many thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 06:17:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2453993#M66148</guid>
      <dc:creator>Sathya141</dc:creator>
      <dc:date>2022-04-13T06:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Thousands(K) into Millinons(M)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2456746#M66315</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="377256" data-lia-user-login="Sathya141" class="lia-mention lia-mention-user"&gt;Sathya141&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your screenshot, I know [Size] column is in TEXT format. If you want to convert "K" by "M" you can try replace function in Power Query Editor.&lt;/P&gt;
&lt;P&gt;"Right Click" on [Size] &amp;gt; "Replace Values"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Replace "K" with "M"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 08:05:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2456746#M66315</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-14T08:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Thousands(K) into Millinons(M)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2459707#M66514</link>
      <description>&lt;P&gt;Thank you for response, but mere replacing doesn't serve the purpose as by replacing, millions(m) will become thousands(k)&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2022 10:06:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2459707#M66514</guid>
      <dc:creator>Sathya141</dc:creator>
      <dc:date>2022-04-16T10:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Thousands(K) into Millinons(M)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2460990#M66616</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="377256" data-lia-user-login="Sathya141" class="lia-mention lia-mention-user"&gt;Sathya141&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you want to replace M by K or K by M and&amp;nbsp;keep the values not change.&lt;/P&gt;
&lt;P&gt;I have a test and you may refer to my M code to learn more details.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Whole M code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtIz9FWK1QEyjAwMvMEsY0MDAwhDzxgiZ6EUGwsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Size = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Size", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Move K and M", each if Text.EndsWith([Size],"K") then Text.Replace([Size],"K","") else if Text.EndsWith([Size],"M") then Text.Replace([Size],"M","") 
else [Size]),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "String", each if Text.EndsWith([Size],"K") then "K" else if Text.EndsWith([Size],"M") then "M" else null),
    #"Changed Type1" = Table.TransformColumnTypes(#"Added Custom1",{{"Move K and M", type number}}),
    #"Added Custom2" = Table.AddColumn(#"Changed Type1", "Convert M to K", each if [String] = "M" then [Move K and M]*1000 else [Move K and M]),
    #"Duplicated Column" = Table.DuplicateColumn(#"Added Custom2", "String", "String - Copy"),
    #"Changed Type2" = Table.TransformColumnTypes(#"Duplicated Column",{{"Convert M to K", type text}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type2","M","K",Replacer.ReplaceText,{"String - Copy"}),
    #"Merged Columns" = Table.CombineColumns(#"Replaced Value",{"Convert M to K", "String - Copy"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"Convert M to K.1")
in
    #"Merged Columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 07:06:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2460990#M66616</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-18T07:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Thousands(K) into Millinons(M)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2461555#M66649</link>
      <description>&lt;P&gt;Thank you for the solution&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 12:33:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Thousands-K-into-Millinons-M/m-p/2461555#M66649</guid>
      <dc:creator>Sathya141</dc:creator>
      <dc:date>2022-04-18T12:33:23Z</dc:date>
    </item>
  </channel>
</rss>

