<?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: Average of a count entries without group by in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461534#M27574</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp;The average is on "count of num of articles", not articles typology.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It didn't work when I tried in a cell (dax formula): The OrderNum cannot be determinated. "This happens when a measure formula refers to a columns that contains many values ..."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think is related to the first VAR (currentorder). When I tried to write Table[NumOrder] it didn't recognize it (only columns with calculations).&lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2020 16:50:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-10-28T16:50:36Z</dc:date>
    <item>
      <title>Average of a count entries without group by</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461351#M27569</link>
      <description>&lt;P&gt;Hello. I have a some columns in my file that correspond to customer's orders: order date, payment date, Number of order, product typology, etc. The behavior of the file is: when some customer order more than 1 item, it creates two lines for the same order, for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Num order&lt;/TD&gt;&lt;TD&gt;Orderdate&lt;/TD&gt;&lt;TD&gt;Sku&lt;/TD&gt;&lt;TD&gt;article typology&lt;/TD&gt;&lt;TD&gt;Count of Num articles&lt;/TD&gt;&lt;TD&gt;Mono or multi orders&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123456&lt;/TD&gt;&lt;TD&gt;10/12/2019&lt;/TD&gt;&lt;TD&gt;65433&lt;/TD&gt;&lt;TD&gt;532&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Multi&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123456&lt;/TD&gt;&lt;TD&gt;10/12/2019&lt;/TD&gt;&lt;TD&gt;65990&lt;/TD&gt;&lt;TD&gt;597&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Multi&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;23456&lt;/TD&gt;&lt;TD&gt;10/12/2019&lt;/TD&gt;&lt;TD&gt;65990&lt;/TD&gt;&lt;TD&gt;597&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Mono&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 2 last columns were calculations done by me: if a order number appears more than 1 time, it is an order that have more than 1 article.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to know the average of article's per multi orders but I don't want to do a group by (by Number of order) to perform this. The way I know is to perform a query that groups by Num of order&amp;nbsp;(all lines of the same order are consolidated in only one) and then do the average.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to do?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried "average_num_articles:=CALCULATE(AVERAGE(Table[Count of Num articles]);FILTER(Table;VALUES(Table[NumOrder])))" without success.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 15:58:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461351#M27569</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-28T15:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: Average of a count entries without group by</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461453#M27572</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; Let me know if I wasn't able to understand your request:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Average of Articles = 
VAR CurrentOrder = jmsm[Num order]
VAR MultiOrders =
    FILTER (
        jmsm,
        jmsm[Mono or Multi Orders] = "Multi"
            &amp;amp;&amp;amp; jmsm[Num order] = CurrentOrder
    )
VAR Result =
    AVERAGEX ( MultiOrders, jmsm[article typology] )
RETURN
    Result
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PBI file attached below my signature:&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 16:25:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461453#M27572</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-10-28T16:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: Average of a count entries without group by</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461534#M27574</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp;The average is on "count of num of articles", not articles typology.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It didn't work when I tried in a cell (dax formula): The OrderNum cannot be determinated. "This happens when a measure formula refers to a columns that contains many values ..."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think is related to the first VAR (currentorder). When I tried to write Table[NumOrder] it didn't recognize it (only columns with calculations).&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 16:50:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461534#M27574</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-28T16:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average of a count entries without group by</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461556#M27578</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;Is this what you want?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 16:57:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461556#M27578</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-10-28T16:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Average of a count entries without group by</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461572#M27580</link>
      <description>&lt;P&gt;Yes, but in a measure not in a column because the average is by OrderNumber and not by each line of each order number.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 17:02:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461572#M27580</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-28T17:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Average of a count entries without group by</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461588#M27582</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;Most of the code is same for Measure:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR CurrentOrder = SELECTEDVALUE ( jmsm[Num order] )
VAR MultiOrders =
    FILTER (
        ALL ( jmsm ),
        jmsm[Mono or Multi Orders] = "Multi"
            &amp;amp;&amp;amp; jmsm[Num order] = CurrentOrder
    )
VAR Result =
    AVERAGEX ( MultiOrders, jmsm[Count of num of articles] )
RETURN
    Result&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 28 Oct 2020 17:08:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-of-a-count-entries-without-group-by/m-p/1461588#M27582</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-10-28T17:08:10Z</dc:date>
    </item>
  </channel>
</rss>

