<?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: Greater than 50% calculated column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3103377#M109210</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have managed to finally get back into my system to check this out and it works absolutely perfectly! Just wanted to say a massive thank you as had really struggled with this one, and it's great you took the time to solve it for me. Really appreciated!&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 10:45:07 GMT</pubDate>
    <dc:creator>Tob_P</dc:creator>
    <dc:date>2023-02-28T10:45:07Z</dc:date>
    <item>
      <title>Greater than 50% calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3092346#M108374</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;I have two directly related tables, Purchase Header &amp;amp; Purchase Line with direct relationship between the two based on two common columns (Delivery No).&lt;P class=""&gt;I want to calculate the number of lines where the delivery is greater than 50%. So the Header has the Delivery No, and the Line table has the Delivery No split out across either a single or multiple line. If there are 7 deliveries that are counted as Day 1 (value in Delivery Day column in Line Table), and 4 are on Day 1 and 3 are on Day 2, then return me the value 'Day 1'. If there is just one Delivery and it's Day 2, then return Day 2...essentially, anything that's &amp;gt; 50%.&lt;/P&gt;&lt;P class=""&gt;In the even that nothing calulates to over 50%, and it's a tie, then the earlier of the 2 days should be in the expected result.&lt;/P&gt;&lt;P class=""&gt;Here is some sample data with expected results - &lt;A href="https://docs.google.com/spreadsheets/d/1jYb0CftenoURkr-Oeay2102xtiOyfbdU/edit?usp=share_link&amp;amp;ouid=108389835693298469342&amp;amp;rtpof=true&amp;amp;sd=true" target="_blank" rel="noopener nofollow ugc"&gt;https://docs.google.com/spreadsheets/d/1jYb0CftenoURkr-Oeay2102xtiOyfbdU/edit?usp=share_link&amp;amp;ouid=108389835693298469342&amp;amp;rtpof=true&amp;amp;sd=true&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Feb 2023 08:53:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3092346#M108374</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2023-02-22T08:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Greater than 50% calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3092494#M108383</link>
      <description>&lt;P&gt;hI&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399872" data-lia-user-login="Tob_P" class="lia-mention lia-mention-user"&gt;Tob_P&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to attached sample file the solution&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Expected Output = 
VAR CurrentDeliveryTable = 
    CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Delivery No] ) )
VAR SummaryTable = 
    GROUPBY ( 
        currentDeliveryTable, 
        'Table'[Delivery Day], 
        "@Count", COUNTX ( CURRENTGROUP ( ), 1 ) 
    )
VAR MaxCountTable = 
    TOPN (  1, SummaryTable, [@Count] )
RETURN
    MINX ( MaxCountTable, [Delivery Day] )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Feb 2023 09:52:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3092494#M108383</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-22T09:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Greater than 50% calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3093386#M108442</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for replying! I don't have full access to the tables that I'm using in my .pbix file currently and once I do and run this against it, I'll come back and hopefully mark this as a solution, but in the meantime, just wanted to say thank you for having a go at this for me - appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 15:57:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3093386#M108442</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2023-02-22T15:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Greater than 50% calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3103377#M109210</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have managed to finally get back into my system to check this out and it works absolutely perfectly! Just wanted to say a massive thank you as had really struggled with this one, and it's great you took the time to solve it for me. Really appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 10:45:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3103377#M109210</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2023-02-28T10:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Greater than 50% calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3235609#M118920</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;You had previously helped me out with this - I was looking to amend it so that the criteria would no longer be &amp;gt;50%, but would be &amp;gt;10% - I've been trying to unpick the logic and have been unable to - is it even possible to amend to include the new criteria?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 12:03:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3235609#M118920</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2023-05-15T12:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Greater than 50% calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3235701#M118928</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="399872" data-lia-user-login="Tob_P" class="lia-mention lia-mention-user"&gt;Tob_P&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;Expected Output =&lt;BR /&gt;VAR CurrentDeliveryTable =&lt;BR /&gt;CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Delivery No] ) )&lt;BR /&gt;VAR SummaryTable =&lt;BR /&gt;GROUPBY (&lt;BR /&gt;currentDeliveryTable,&lt;BR /&gt;'Table'[Delivery Day],&lt;BR /&gt;"@Count", COUNTX ( CURRENTGROUP (), 1 )&lt;BR /&gt;)&lt;BR /&gt;VAR MaxCountTable =&lt;BR /&gt;TOPN ( 1, SummaryTable, [@Count], ASC )&lt;BR /&gt;RETURN&lt;BR /&gt;MINX ( MaxCountTable, [Delivery Day] )&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 12:55:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3235701#M118928</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-15T12:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Greater than 50% calculated column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3253112#M120079</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies for delayed response as I was off sick. I hate to ask (I'm only doing so as I am struggling to understand how this piece of DAX works completely, otherwise I would look to amend it myself), and also appreciate you have invested time in this alongside all the other help you offer the community.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've had a request in order that colleagues would also like to see the results if the following criteria were met (in this order)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is a late load (Delivery Day = 4), then the load is counted as Late&lt;/P&gt;&lt;P&gt;If there is a Day 1 load (Delivery Day = 1), then the load is counted as Day 1&lt;/P&gt;&lt;P&gt;If there is a Day 2 load (Delivery Day = 2), then the load is counted as Day 2&lt;/P&gt;&lt;P&gt;If there is a Day 3 load (Delivery Day = 3), then the load is counted as Day 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 11:06:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Greater-than-50-calculated-column/m-p/3253112#M120079</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2023-05-25T11:06:29Z</dc:date>
    </item>
  </channel>
</rss>

