<?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: DAX measure for Unit Conversion in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-for-Unit-Conversion/m-p/2693001#M81151</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&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;Here is a link to download a sample solution file:&lt;BR /&gt;&lt;A href="https://spartabiltd-my.sharepoint.com/:u:/g/personal/avishayf_spartabi_com/EeLtqzmMKWVFu33bWk86dvgB_t2kbHEKx-uuSi7SRWUR_A?e=JsN9v1" target="_blank"&gt;DAX measure for Unit Conversion 2022-08-10.pbix&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GB Value = 
SWITCH(
    TRUE(),
    CONTAINSSTRING('Table'[Column1], "GB"), 'Table'[Column1],
    CONTAINSSTRING('Table'[Column1], "MB"), VALUE(LEFT('Table'[Column1], FIND(" ", 'Table'[Column1], 1) - 1 )) / 1000 &amp;amp; " MB",
    CONTAINSSTRING('Table'[Column1], "TB"), VALUE(LEFT('Table'[Column1], FIND(" ", 'Table'[Column1], 1) - 1 )) / 0.001 &amp;amp; " TB"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Data-Stories-Gallery/Contoso-by-SpartaBI/m-p/2449543" target="_blank" rel="noopener"&gt;&lt;FONT size="4" color="#0000EE"&gt;Showcase Report – Contoso By SpartaBI&lt;/FONT&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A href="https://www.linkedin.com/company/spartabi" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt; &amp;nbsp;&amp;nbsp;&lt;A href="https://www.facebook.com/SpartaBI" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2022 15:44:16 GMT</pubDate>
    <dc:creator>SpartaBI</dc:creator>
    <dc:date>2022-08-10T15:44:16Z</dc:date>
    <item>
      <title>DAX measure for Unit Conversion</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-for-Unit-Conversion/m-p/2692963#M81148</link>
      <description>&lt;P&gt;Please I need help. I have a field named Size and example of information in it is (e.g 30 GB, 50 MB, 40 TB).&amp;nbsp; &amp;nbsp;My goal is to create another column with DAX by converting all the values into GB. So if a value is 30 GB, no calculation will be done, if a value is 50 MB, the condition will divide the 50 by 1000, if a value is 40 TB, the condition will divide 40 by 0.001.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 15:29:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-for-Unit-Conversion/m-p/2692963#M81148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-10T15:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure for Unit Conversion</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-for-Unit-Conversion/m-p/2693001#M81151</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&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;Here is a link to download a sample solution file:&lt;BR /&gt;&lt;A href="https://spartabiltd-my.sharepoint.com/:u:/g/personal/avishayf_spartabi_com/EeLtqzmMKWVFu33bWk86dvgB_t2kbHEKx-uuSi7SRWUR_A?e=JsN9v1" target="_blank"&gt;DAX measure for Unit Conversion 2022-08-10.pbix&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GB Value = 
SWITCH(
    TRUE(),
    CONTAINSSTRING('Table'[Column1], "GB"), 'Table'[Column1],
    CONTAINSSTRING('Table'[Column1], "MB"), VALUE(LEFT('Table'[Column1], FIND(" ", 'Table'[Column1], 1) - 1 )) / 1000 &amp;amp; " MB",
    CONTAINSSTRING('Table'[Column1], "TB"), VALUE(LEFT('Table'[Column1], FIND(" ", 'Table'[Column1], 1) - 1 )) / 0.001 &amp;amp; " TB"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Data-Stories-Gallery/Contoso-by-SpartaBI/m-p/2449543" target="_blank" rel="noopener"&gt;&lt;FONT size="4" color="#0000EE"&gt;Showcase Report – Contoso By SpartaBI&lt;/FONT&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.spartabi.com" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;A href="https://www.linkedin.com/company/spartabi" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt; &amp;nbsp;&amp;nbsp;&lt;A href="https://www.facebook.com/SpartaBI" target="_blank" rel="noopener"&gt;&lt;img /&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 15:44:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-for-Unit-Conversion/m-p/2693001#M81151</guid>
      <dc:creator>SpartaBI</dc:creator>
      <dc:date>2022-08-10T15:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure for Unit Conversion</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-for-Unit-Conversion/m-p/2693030#M81153</link>
      <description>&lt;P&gt;Oh wow, thank you so much. This really helps. But is there a way to make usre the units does not show again in the converted column?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 15:55:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-for-Unit-Conversion/m-p/2693030#M81153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-10T15:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure for Unit Conversion</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-for-Unit-Conversion/m-p/2706129#M82059</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DAX measure for Unit Conversion1 =
SWITCH(
TRUE(),
RIGHT('Table'[Size],2)="GB",VALUE( LEFT('Table'[Size],LEN([Size])-(SEARCH("GB",[Size])-1))),
RIGHT('Table'[Size],2)="MB",DIVIDE( VALUE( LEFT('Table'[Size],LEN([Size])-(SEARCH("MB",[Size])-1))),1000),
RIGHT('Table'[Size],2)="TB",VALUE( LEFT('Table'[Size],LEN([Size]) -(SEARCH("TB",[Size])-1)))/0.001)&lt;/LI-CODE&gt;
&lt;P&gt;2. Select [DAX measure for Unit Conversion1] – set the decimal point to 2.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;3. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 09:46:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-for-Unit-Conversion/m-p/2706129#M82059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-17T09:46:35Z</dc:date>
    </item>
  </channel>
</rss>

