<?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: Measure return Inf in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3224433#M118022</link>
    <description>&lt;P&gt;It's working as expected. Thank you so much....&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 May 2023 07:13:00 GMT</pubDate>
    <dc:creator>NickzNickz</dc:creator>
    <dc:date>2023-05-08T07:13:00Z</dc:date>
    <item>
      <title>Measure return Inf</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3217316#M117483</link>
      <description>&lt;P&gt;Hi ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have below measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Variance Projection = 

VAR
    _Nos = [Sum Achievement %] - [Sum Projection]

VAR
    _percentage =
        _Nos / [Sum Projection]

VAR
    _direction =
        SWITCH(
                TRUE(),
                [Sum Achievement %] &amp;gt;= [Sum Projection], UNICHAR(9650),
                [Sum Achievement %] &amp;lt; [Sum Projection], UNICHAR(9660)
        )

Return 
    _direction &amp;amp; " " &amp;amp; FORMAT(_percentage, "0.00%") &amp;amp; " (" &amp;amp;FORMAT(_Nos, "0.00") &amp;amp;")"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the Sum Projection has a value the result return as expected.&lt;/P&gt;&lt;P&gt;However, if empty/0 its returns &lt;EM&gt;&lt;STRONG&gt;Inf ... How can I resolve that?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;At least the result return value of 0.00 instead of &lt;EM&gt;&lt;STRONG&gt;Inf.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;Thank you.&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;NickzNickz&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 08:04:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3217316#M117483</guid>
      <dc:creator>NickzNickz</dc:creator>
      <dc:date>2023-05-03T08:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Measure return Inf</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3217344#M117488</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Instead of using "/" use DIVIDE function. This will avoid any issued with dividing by 0.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;E.g. DIVIDE(_Nos, [sum projection])&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 08:19:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3217344#M117488</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2023-05-03T08:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Measure return Inf</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3217347#M117489</link>
      <description>&lt;P&gt;You can use COALESCE to return 0 instead of blank,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Variance Projection =
VAR _Achievement = [Sum Achievement %]
VAR _Projection = [Sum Projection]
VAR _Nos = _Achievement - _Projection
VAR _percentage =
    COALESCE ( DIVIDE ( _Nos, _Projection ), 0 )
VAR _direction =
    SWITCH (
        TRUE (),
        _Achievement &amp;gt;= _Projection, UNICHAR ( 9650 ),
        _Achievement &amp;lt; _Projection, UNICHAR ( 9660 )
    )
RETURN
    _direction &amp;amp; " "
        &amp;amp; FORMAT ( _percentage, "0.00%" ) &amp;amp; " ("
        &amp;amp; FORMAT ( _Nos, "0.00" ) &amp;amp; ")"
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 May 2023 08:25:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3217347#M117489</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-03T08:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Measure return Inf</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3224433#M118022</link>
      <description>&lt;P&gt;It's working as expected. Thank you so much....&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 07:13:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3224433#M118022</guid>
      <dc:creator>NickzNickz</dc:creator>
      <dc:date>2023-05-08T07:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Measure return Inf</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3224435#M118023</link>
      <description>&lt;P&gt;Thank you so much.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 07:14:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-return-Inf/m-p/3224435#M118023</guid>
      <dc:creator>NickzNickz</dc:creator>
      <dc:date>2023-05-08T07:14:43Z</dc:date>
    </item>
  </channel>
</rss>

