<?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 Percentage - how to default a blank to 0%, rather than 100%? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-how-to-default-a-blank-to-0-rather-than-100/m-p/4136331#M164311</link>
    <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to clean up a sheet I have inherited from my predecessor.&lt;BR /&gt;It involves a very basic Dax formula that the company uses to calculate staff productivity:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Productivity =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DIVIDE(&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;|&amp;nbsp; &amp;nbsp; &amp;nbsp;SUM('Employee_Hours'[Job_Hours]),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;|&amp;nbsp; &amp;nbsp; &amp;nbsp;SUM('Employee_Hours'[Hours_Rostered)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;) + 1&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;The problem with this formula is that if an employee has registered zero hours, then their productivcity defaults to 100%.&amp;nbsp; 0% would be the preferred default, if that is possible.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My dax skills are pretty basic that a solution immediately jumps out at me here - is there a better way to write this formula?&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2024 23:34:54 GMT</pubDate>
    <dc:creator>Jumper</dc:creator>
    <dc:date>2024-09-05T23:34:54Z</dc:date>
    <item>
      <title>Percentage - how to default a blank to 0%, rather than 100%?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-how-to-default-a-blank-to-0-rather-than-100/m-p/4136331#M164311</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to clean up a sheet I have inherited from my predecessor.&lt;BR /&gt;It involves a very basic Dax formula that the company uses to calculate staff productivity:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Productivity =&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;DIVIDE(&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;|&amp;nbsp; &amp;nbsp; &amp;nbsp;SUM('Employee_Hours'[Job_Hours]),&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;|&amp;nbsp; &amp;nbsp; &amp;nbsp;SUM('Employee_Hours'[Hours_Rostered)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;) + 1&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;The problem with this formula is that if an employee has registered zero hours, then their productivcity defaults to 100%.&amp;nbsp; 0% would be the preferred default, if that is possible.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My dax skills are pretty basic that a solution immediately jumps out at me here - is there a better way to write this formula?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 23:34:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-how-to-default-a-blank-to-0-rather-than-100/m-p/4136331#M164311</guid>
      <dc:creator>Jumper</dc:creator>
      <dc:date>2024-09-05T23:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage - how to default a blank to 0%, rather than 100%?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-how-to-default-a-blank-to-0-rather-than-100/m-p/4136343#M164312</link>
      <description>&lt;P class="lia-align-left"&gt;Here's a screenshot if that helps explain a little better:&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2024 23:46:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-how-to-default-a-blank-to-0-rather-than-100/m-p/4136343#M164312</guid>
      <dc:creator>Jumper</dc:creator>
      <dc:date>2024-09-05T23:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage - how to default a blank to 0%, rather than 100%?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-how-to-default-a-blank-to-0-rather-than-100/m-p/4137136#M164333</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="444278" data-lia-user-login="Jumper" class="lia-mention lia-mention-user"&gt;Jumper&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try to modify your formula like below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Productivity = 
IF(
    SUM('Employee_Hours'[Hours_Rostered]) = 0,
    0,
    DIVIDE(
        SUM('Employee_Hours'[Job_Hours]),
        SUM('Employee_Hours'[Hours_Rostered])
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Adamk Kong&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 08:38:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-how-to-default-a-blank-to-0-rather-than-100/m-p/4137136#M164333</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-06T08:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Percentage - how to default a blank to 0%, rather than 100%?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-how-to-default-a-blank-to-0-rather-than-100/m-p/4148343#M164845</link>
      <description>&lt;P&gt;Brilliant - this works perfectly.&lt;/P&gt;&lt;P&gt;Thank you so much, and sorry for a slow reply (had a few days off!).&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 01:58:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Percentage-how-to-default-a-blank-to-0-rather-than-100/m-p/4148343#M164845</guid>
      <dc:creator>Jumper</dc:creator>
      <dc:date>2024-09-13T01:58:14Z</dc:date>
    </item>
  </channel>
</rss>

