<?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: count and average in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/count-and-average/m-p/3076751#M97877</link>
    <description>&lt;P&gt;I appreciate your suggestion. I'm not sure I can adhere to this instruction. I'm not very good at understanding, but I'll attempt to learn. thanks once again&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2023 01:18:27 GMT</pubDate>
    <dc:creator>natthachai</dc:creator>
    <dc:date>2023-02-13T01:18:27Z</dc:date>
    <item>
      <title>count and average</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/count-and-average/m-p/3076337#M97857</link>
      <description>&lt;P&gt;I look for the response to questions I'm not sure how to ask.&amp;nbsp;I constantly update new information. There are multiple rows in each day. I can count the number of rows. However, I prefer to average across weeks or months.&amp;nbsp;to use this table in power bi.&amp;nbsp;I can configure the specified date to count using the example. But I'm unable to select the average. Please let me know. Should the table have a calculation column added? How do I select and set it up?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Subject&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Detail&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/4/2023&lt;/TD&gt;&lt;TD&gt;Video&lt;/TD&gt;&lt;TD&gt;Video provides a powerful way to help you prove your point.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/4/2023&lt;/TD&gt;&lt;TD&gt;When&lt;/TD&gt;&lt;TD&gt;When you click Online Video, you can paste in the embed code for the video you want to add.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/4/2023&lt;/TD&gt;&lt;TD&gt;You&lt;/TD&gt;&lt;TD&gt;You can also type a keyword to search online for the video that best fits your document.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/4/2023&lt;/TD&gt;&lt;TD&gt;To&lt;/TD&gt;&lt;TD&gt;To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/4/2023&lt;/TD&gt;&lt;TD&gt;For&lt;/TD&gt;&lt;TD&gt;For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/5/2023&lt;/TD&gt;&lt;TD&gt;Video&lt;/TD&gt;&lt;TD&gt;Video provides a powerful way to help you prove your point.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/5/2023&lt;/TD&gt;&lt;TD&gt;When&lt;/TD&gt;&lt;TD&gt;When you click Online Video, you can paste in the embed code for the video you want to add.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/5/2023&lt;/TD&gt;&lt;TD&gt;You&lt;/TD&gt;&lt;TD&gt;You can also type a keyword to search online for the video that best fits your document.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/5/2023&lt;/TD&gt;&lt;TD&gt;To&lt;/TD&gt;&lt;TD&gt;To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/6/2023&lt;/TD&gt;&lt;TD&gt;For&lt;/TD&gt;&lt;TD&gt;For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/6/2023&lt;/TD&gt;&lt;TD&gt;Video&lt;/TD&gt;&lt;TD&gt;Video provides a powerful way to help you prove your point.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/6/2023&lt;/TD&gt;&lt;TD&gt;When&lt;/TD&gt;&lt;TD&gt;When you click Online Video, you can paste in the embed code for the video you want to add.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/6/2023&lt;/TD&gt;&lt;TD&gt;You&lt;/TD&gt;&lt;TD&gt;You can also type a keyword to search online for the video that best fits your document.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/6/2023&lt;/TD&gt;&lt;TD&gt;To&lt;/TD&gt;&lt;TD&gt;To make your document look professionally produced, Word provides header, footer, cover page, and text box designs that complement each other.&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/6/2023&lt;/TD&gt;&lt;TD&gt;For&lt;/TD&gt;&lt;TD&gt;For example, you can add a matching cover page, header, and sidebar. Click Insert and then choose the elements you want from the different galleries.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sun, 12 Feb 2023 06:53:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/count-and-average/m-p/3076337#M97857</guid>
      <dc:creator>natthachai</dc:creator>
      <dc:date>2023-02-12T06:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: count and average</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/count-and-average/m-p/3076476#M97859</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am not entirely sure I understood your question, but you can get the average of the row totals like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;measure 39 = &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;isblank&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (25)'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;)), &lt;/SPAN&gt;&lt;SPAN&gt;//check if row is total&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;counta&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (25)'&lt;/SPAN&gt;&lt;SPAN&gt;[Detail]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (25)'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))), &lt;/SPAN&gt;&lt;SPAN&gt;//calculate Average for total row&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;counta&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table (25)'&lt;/SPAN&gt;&lt;SPAN&gt;[Detail]&lt;/SPAN&gt;&lt;SPAN&gt;)) &lt;/SPAN&gt;&lt;SPAN&gt;//count values&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Example:&lt;BR /&gt;&lt;img /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
Count for months is 5 and 4 respectively and their average is 4.5&lt;BR /&gt;&lt;BR /&gt;I would solve this in dax instead of PQ since your goal seems to be to have a dynamic calculation depending if week or month is selected for filtering.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!&lt;BR /&gt;&lt;BR /&gt;My LinkedIn: &lt;A href="https://www.linkedin.com/in/n%C3%A4ttiahov-00001/" target="_blank" rel="noopener"&gt;https://www.linkedin.com/in/n%C3%A4ttiahov-00001/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 12 Feb 2023 10:05:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/count-and-average/m-p/3076476#M97859</guid>
      <dc:creator>ValtteriN</dc:creator>
      <dc:date>2023-02-12T10:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: count and average</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/count-and-average/m-p/3076751#M97877</link>
      <description>&lt;P&gt;I appreciate your suggestion. I'm not sure I can adhere to this instruction. I'm not very good at understanding, but I'll attempt to learn. thanks once again&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2023 01:18:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/count-and-average/m-p/3076751#M97877</guid>
      <dc:creator>natthachai</dc:creator>
      <dc:date>2023-02-13T01:18:27Z</dc:date>
    </item>
  </channel>
</rss>

