<?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: How to create average formule based on different data in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001611#M155963</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763151" data-lia-user-login="Dcichy" class="lia-mention lia-mention-user"&gt;Dcichy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;not clear about this. You want the average. Thne you said for task 1 the sum is 12. Then what's the expected output?&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2024 09:33:58 GMT</pubDate>
    <dc:creator>ryan_mayu</dc:creator>
    <dc:date>2024-06-20T09:33:58Z</dc:date>
    <item>
      <title>How to create average formule based on different data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001567#M155962</link>
      <description>&lt;P&gt;Hi guys&amp;nbsp;&lt;BR /&gt;I've got tricky question about creating new Average formule. I would like to create formula which will show average of days from specyfic tasks. Tasks should be calculated as for example: task 1 is typed twice so sum of this task equals 12, task 2 lasts 3 days, task&amp;nbsp; 4 lasts 7 days.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Task&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; days&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;BR /&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 09:13:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001567#M155962</guid>
      <dc:creator>Dcichy</dc:creator>
      <dc:date>2024-06-20T09:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create average formule based on different data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001611#M155963</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763151" data-lia-user-login="Dcichy" class="lia-mention lia-mention-user"&gt;Dcichy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;not clear about this. You want the average. Thne you said for task 1 the sum is 12. Then what's the expected output?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 09:33:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001611#M155963</guid>
      <dc:creator>ryan_mayu</dc:creator>
      <dc:date>2024-06-20T09:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create average formule based on different data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001621#M155964</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82327" data-lia-user-login="ryan_mayu" class="lia-mention lia-mention-user"&gt;ryan_mayu&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;I meant that sum of days for task 1 is 4+8, because this tasks appears twice, and this formula should count it as 12 because this is one task with duration splited into two&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 09:37:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001621#M155964</guid>
      <dc:creator>Dcichy</dc:creator>
      <dc:date>2024-06-20T09:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create average formule based on different data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001630#M155965</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763151" data-lia-user-login="Dcichy" class="lia-mention lia-mention-user"&gt;Dcichy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can use sum(days)&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;not sure if this is the output that you want&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 09:41:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001630#M155965</guid>
      <dc:creator>ryan_mayu</dc:creator>
      <dc:date>2024-06-20T09:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create average formule based on different data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001648#M155966</link>
      <description>&lt;P&gt;I mentioned very simple example. I tried to support myself with ChatGPT but i doesn't work. ChatGPR suggested to creat first column like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Averageoftasks= &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(Tasks, Tasks[TaskName], &lt;/SPAN&gt;&lt;SPAN&gt;"Sumdays"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(Tasks[task duration ])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;and then measure:&lt;BR /&gt;&lt;BR /&gt;SredniaDniZadan =&lt;BR /&gt;AVERAGEX(&lt;BR /&gt;Averageoftasks,&lt;BR /&gt;[Sumdays]&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;I received problem like:&amp;nbsp;The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Jun 2024 09:50:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001648#M155966</guid>
      <dc:creator>Dcichy</dc:creator>
      <dc:date>2024-06-20T09:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create average formule based on different data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001658#M155967</link>
      <description>&lt;P&gt;why not create a measuer and use average?&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Measure&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt; &lt;SPAN&gt;average&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[days]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;if this is not what you want, then pls provide the expected output based on the sample data you provided.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Jun 2024 09:54:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4001658#M155967</guid>
      <dc:creator>ryan_mayu</dc:creator>
      <dc:date>2024-06-20T09:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create average formule based on different data</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4010831#M157844</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763151" data-lia-user-login="Dcichy" class="lia-mention lia-mention-user"&gt;Dcichy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;May I ask if your problem has been solved. If the above reply was helpful, you may consider marking it as solution. If the problem is not yet solved, you can follow the steps below:&lt;/P&gt;
&lt;P&gt;Add new measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;result =
VAR _total =
    CALCULATE (
        SUM ( 'Table'[days] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Task] = SELECTEDVALUE ( 'Table'[Task] ) )
    )
VAR _count =
    CALCULATE (
        COUNTROWS ( 'Table' ),
        FILTER ( ALL ( 'Table' ), 'Table'[Task] = SELECTEDVALUE ( 'Table'[Task] ) )
    )
RETURN
    _total / _count
&lt;/LI-CODE&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 07:18:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-create-average-formule-based-on-different-data/m-p/4010831#M157844</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-02T07:18:37Z</dc:date>
    </item>
  </channel>
</rss>

