<?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: Need help with the DAX Calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027637#M159103</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;1 % Of Arrivals = divide([Stay Number of Arrivals], [1 Total Arrivals])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This makes no sense as it will always return 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you trying to achieve ultimately?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2024 21:50:13 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-07-05T21:50:13Z</dc:date>
    <item>
      <title>Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4025578#M158912</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sample file. (I'm unable to attach the file over here but I can share)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Based on the data, the output generated by the below dax for "Average Lead Time" is 16.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Average Lead Time =&lt;BR /&gt;CALCULATE(MAX(Sheet2[LEAD_TIME_NR]),&lt;BR /&gt;FILTER(ALLSELECTED(Sheet2[LEAD_TIME_NR]),[1 % Of Arrivals Running Total] &amp;gt;= 0.8 &amp;amp;&amp;amp; [1 Previous Cumulative] &amp;lt; 0.8)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other Dax used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;1 % Of Arrivals Running Total =&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CALCULATE(&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[1 % Of Arrivals],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALLSELECTED('Sheet2'[LEAD_TIME_NR]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ISONORAFTER('Sheet2'[LEAD_TIME_NR], MAX('Sheet2'[LEAD_TIME_NR]), DESC)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1 Previous Cumulative = [1 % Of Arrivals Running Total] - [1 % Of Arrivals]&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1 % Of Arrivals = divide([Stay Number of Arrivals], [1 Total Arrivals])&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Stay Number of Arrivals:= CALCULATE(sum(Sheet2[ROOMS_OCC_NR]), FILTER(Sheet2, Sheet2[ARRIVAL_IND] = "Y"))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1 Total Arrivals = CALCULATE(sum(Sheet2[ROOMS_OCC_NR]), all(Sheet2[LEAD_TIME_NR]), Sheet2[ARRIVAL_IND] = "Y")&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;I tried but unable to break the logic in the dax. Please if someone could help me would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Mithilesh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 18:07:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4025578#M158912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-04T18:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4025859#M158950</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 01:04:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4025859#M158950</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-07-05T01:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4026014#M158968</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for responding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have uploaded the file to the following link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/mk1rtyuj5vfi58renianc/Sample-File.xlsx?rlkey=9jfalqlo4ae90urn704ocf7u0&amp;amp;dl=0" target="_blank"&gt;https://www.dropbox.com/scl/fi/mk1rtyuj5vfi58renianc/Sample-File.xlsx?rlkey=9jfalqlo4ae90urn704ocf7u0&amp;amp;dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mithilesh&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 02:47:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4026014#M158968</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-05T02:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027637#M159103</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;1 % Of Arrivals = divide([Stay Number of Arrivals], [1 Total Arrivals])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This makes no sense as it will always return 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you trying to achieve ultimately?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 21:50:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027637#M159103</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-07-05T21:50:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027640#M159104</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You're absolutely right, it will always give 1. Actually, this was written by someone a long time back.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to trace how the "&lt;SPAN&gt;Average Lead Time" is 16&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mithilesh&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 21:43:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027640#M159104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-05T21:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027652#M159107</link>
      <description>&lt;P&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Average Lead Time" is neither an average nor will it ever hit 16, at least not based on your sample data.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What is the business problem you are trying to solve?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 22:35:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027652#M159107</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-07-05T22:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027656#M159108</link>
      <description>&lt;P&gt;I'm trying to find the&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Average Lead Time". As per the Power BI file, I created, it shows ""Average Lead Time" as 16. The Power BI file is in the following location&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dropbox.com/scl/fi/mk1rtyuj5vfi58renianc/Sample-File.xlsx?rlkey=9jfalqlo4ae90urn704ocf7u0&amp;amp;dl=0" target="_blank"&gt;https://www.dropbox.com/scl/fi/mk1rtyuj5vfi58renianc/Sample-File.xlsx?rlkey=9jfalqlo4ae90urn704ocf7u0&amp;amp;dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mithilesh&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 22:44:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027656#M159108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-05T22:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027664#M159109</link>
      <description>&lt;P&gt;Have you tried a graphical solution?&amp;nbsp; Here is the average lead time based on your raw data, by date, Arrival Indiator and Rooms Occ Nr.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;What is the point of the running totals?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 22:55:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027664#M159109</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-07-05T22:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027672#M159112</link>
      <description>&lt;P&gt;Yes, I did and I'm getting 13.88&lt;/P&gt;&lt;P&gt;However, I'm curious to know how Power BI is returning 16 based on the DAX formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I'm missing something in the following DAX:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;1 % Of Arrivals Running Total =&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CALCULATE(&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[1 % Of Arrivals],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ALLSELECTED('Sheet2'[LEAD_TIME_NR]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ISONORAFTER('Sheet2'[LEAD_TIME_NR], MAX('Sheet2'[LEAD_TIME_NR]), DESC)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;Mithilesh&lt;/DIV&gt;</description>
      <pubDate>Fri, 05 Jul 2024 23:09:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4027672#M159112</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-05T23:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the DAX Calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4032431#M159533</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to break down the working of DAX. Basically, it is performing the running totals to get a distribution of lead time with respect to the average lead time. And this is done by the function&amp;nbsp;&lt;SPAN&gt;ISONORAFTER&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 11:14:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-DAX-Calculation/m-p/4032431#M159533</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-09T11:14:26Z</dc:date>
    </item>
  </channel>
</rss>

