<?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 Need help writing a Dax formula in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-a-Dax-formula/m-p/3075229#M106900</link>
    <description>&lt;P&gt;Hello&lt;BR /&gt;&lt;BR /&gt;I'm unsure how to combine these two amounts into one amount and then show the amount subtracted from the Perfect Monthly availability.&lt;BR /&gt;&lt;BR /&gt;The Perfect Monthly is calculated in Power Query using the #of Days in each month (Jan) 31x 24x60x60 = 2678400&lt;BR /&gt;&lt;BR /&gt;The Imperfect amount is the Total duration column of each Jan record - subtracted from this above Perfect Monthly amount. There are only two dates in January that our system failed. All the other months, the availability is perfect. I would like to be able to reflect this in the report below. I'm not sure how to write the DAX formula. I would like these two records for January to be combined as one total, and then subtracted from the month's January Perfect Availability amount 26784.00.&amp;nbsp;&lt;BR /&gt;The formula for the Monthly Perfect Availability is #of days in a Month x 24x60x60&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is currently how my report looks. It would be nice to show all the Perfect Availability Amounts and the January amounts showing the duration of, 23400 subtracted from the January's Perfect Monthly Availability.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you kindly&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 18:30:14 GMT</pubDate>
    <dc:creator>Dallas7890</dc:creator>
    <dc:date>2023-02-10T18:30:14Z</dc:date>
    <item>
      <title>Need help writing a Dax formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-a-Dax-formula/m-p/3075229#M106900</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;&lt;BR /&gt;I'm unsure how to combine these two amounts into one amount and then show the amount subtracted from the Perfect Monthly availability.&lt;BR /&gt;&lt;BR /&gt;The Perfect Monthly is calculated in Power Query using the #of Days in each month (Jan) 31x 24x60x60 = 2678400&lt;BR /&gt;&lt;BR /&gt;The Imperfect amount is the Total duration column of each Jan record - subtracted from this above Perfect Monthly amount. There are only two dates in January that our system failed. All the other months, the availability is perfect. I would like to be able to reflect this in the report below. I'm not sure how to write the DAX formula. I would like these two records for January to be combined as one total, and then subtracted from the month's January Perfect Availability amount 26784.00.&amp;nbsp;&lt;BR /&gt;The formula for the Monthly Perfect Availability is #of days in a Month x 24x60x60&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is currently how my report looks. It would be nice to show all the Perfect Availability Amounts and the January amounts showing the duration of, 23400 subtracted from the January's Perfect Monthly Availability.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you kindly&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 18:30:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-a-Dax-formula/m-p/3075229#M106900</guid>
      <dc:creator>Dallas7890</dc:creator>
      <dc:date>2023-02-10T18:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need help writing a Dax formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-a-Dax-formula/m-p/3082728#M107522</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="191621" data-lia-user-login="Dallas7890" class="lia-mention lia-mention-user"&gt;Dallas7890&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try below steps:&lt;/P&gt;
&lt;P&gt;1. below is my test table&lt;/P&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table2:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. add a new column in Table2 with below dax formula&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Total Amounts =
VAR cur_month =
    MONTH ( [Month] )
VAR tmp =
    FILTER ( 'Table', MONTH ( [Date] ) = cur_month )
VAR _val =
    SUMX ( tmp, [Duration] )
RETURN
    [Perfect Monthly Avaliability] - _val
&lt;/LI-CODE&gt;
&lt;P&gt;3. add a clustered column chart visual with Table2 fields&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Please refer the attached .pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_Binbin Yu&lt;BR /&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>Thu, 16 Feb 2023 05:55:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-a-Dax-formula/m-p/3082728#M107522</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-16T05:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help writing a Dax formula</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-a-Dax-formula/m-p/3093055#M108419</link>
      <description>&lt;P&gt;Thank you so much, this is the perfect solution.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 14:12:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-writing-a-Dax-formula/m-p/3093055#M108419</guid>
      <dc:creator>Dallas7890</dc:creator>
      <dc:date>2023-02-22T14:12:24Z</dc:date>
    </item>
  </channel>
</rss>

