<?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: Calculated Column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292196#M56385</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="136873" data-lia-user-login="sdhn" class="lia-mention lia-mention-user"&gt;sdhn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share a sample of your data in a text format?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW, try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Column =([col1]-[col2])/[col2]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 22:59:00 GMT</pubDate>
    <dc:creator>VahidDM</dc:creator>
    <dc:date>2022-01-19T22:59:00Z</dc:date>
    <item>
      <title>Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292190#M56383</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create calculated column in power bi as below:&lt;/P&gt;&lt;P&gt;Column =(col1-col2)/col2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will appreciate your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 22:56:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292190#M56383</guid>
      <dc:creator>sdhn</dc:creator>
      <dc:date>2022-01-19T22:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292196#M56385</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="136873" data-lia-user-login="sdhn" class="lia-mention lia-mention-user"&gt;sdhn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share a sample of your data in a text format?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW, try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Column =([col1]-[col2])/[col2]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 22:59:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292196#M56385</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2022-01-19T22:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292219#M56392</link>
      <description>&lt;P&gt;Sum values come in new&amp;nbsp; column come as "NaN" &amp;amp; in one row value of New Column is&amp;nbsp; "Infinity".&amp;nbsp; Rest rows are fine.&amp;nbsp; &amp;nbsp;Any advise Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 23:14:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292219#M56392</guid>
      <dc:creator>sdhn</dc:creator>
      <dc:date>2022-01-19T23:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292229#M56394</link>
      <description>&lt;P&gt;If both columns have "0" value output come as NaN&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Column =([0]-[0])/[0] &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;output is "NaN"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in one row I have value for column 1 = 13&lt;/P&gt;&lt;P&gt;column 2 = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Column =([13]-[0])/[0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Out put is&amp;nbsp; infinity&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 23:24:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292229#M56394</guid>
      <dc:creator>sdhn</dc:creator>
      <dc:date>2022-01-19T23:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292232#M56395</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="136873" data-lia-user-login="sdhn" class="lia-mention lia-mention-user"&gt;sdhn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Column =IF([col2]=0,blank(),([col1]-[col2])/[col2])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 23:31:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292232#M56395</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2022-01-19T23:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292348#M56399</link>
      <description>&lt;P&gt;Great , thi ssolve the issue.&amp;nbsp; One more request.&lt;/P&gt;&lt;P&gt;I am getting negative figures in few rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;as -0.3 %.&amp;nbsp; I want to display any "-" as '0'.&amp;nbsp; &amp;nbsp;Can you help on this too? thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 02:07:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292348#M56399</guid>
      <dc:creator>sdhn</dc:creator>
      <dc:date>2022-01-20T02:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292350#M56400</link>
      <description>&lt;P&gt;I meant Just display 0 if there is any negative "-"&amp;nbsp; number&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 02:07:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292350#M56400</guid>
      <dc:creator>sdhn</dc:creator>
      <dc:date>2022-01-20T02:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292374#M56402</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="136873" data-lia-user-login="sdhn" class="lia-mention lia-mention-user"&gt;sdhn&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Column =
IF (
    [col2] = 0,
    BLANK (),
    IF ( [col1] - [col2] &amp;lt; 0, 0, ( [col1] - [col2] ) / [col2] )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If my posts&amp;nbsp;&lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;, please consider&amp;nbsp;&lt;FONT color="#008000"&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;FONT color="#008000"&gt;&lt;SPAN&gt;&amp;nbsp;them as solutions&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 02:22:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2292374#M56402</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2022-01-20T02:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2293896#M56494</link>
      <description>&lt;P&gt;Thanks, great help&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 16:25:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Column/m-p/2293896#M56494</guid>
      <dc:creator>sdhn</dc:creator>
      <dc:date>2022-01-20T16:25:12Z</dc:date>
    </item>
  </channel>
</rss>

