<?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 on weeklevel in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-on-weeklevel/m-p/1095686#M15969</link>
    <description>&lt;P&gt;Thanks for your message! Only one thing I've to say. When I want to compare the costs per day with the average costs per week, I will have the same changes. So when I've got for example 340 euros on 3-9-2019, the average changes to 340. So the average is changing...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 May 2020 07:40:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-19T07:40:32Z</dc:date>
    <item>
      <title>Average on weeklevel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-on-weeklevel/m-p/1095615#M15967</link>
      <description>&lt;P&gt;Goodmorning all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to make a new measurement on weeklevel. On this stage I have costs per day, but i need the average costs per week.&lt;/P&gt;&lt;P&gt;Which DAX-formula do you prefer? I have a filter on datum (date) and week. Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 07:00:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-on-weeklevel/m-p/1095615#M15967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-19T07:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Average on weeklevel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-on-weeklevel/m-p/1095655#M15968</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If what you are showing is a table visual with Datum and Week in rows:&lt;/P&gt;
&lt;P&gt;Measure = CALCULATE( AVERAGE(Table1[Costs]), ALL(Table1[Datum]) )&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Please mark the question solved when done and consider &lt;FONT color="#FF9900"&gt;giving kudos if posts are helpful.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;Contact me privately for support with any larger-scale BI needs&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 07:18:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-on-weeklevel/m-p/1095655#M15968</guid>
      <dc:creator>AlB</dc:creator>
      <dc:date>2020-05-19T07:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Average on weeklevel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-on-weeklevel/m-p/1095686#M15969</link>
      <description>&lt;P&gt;Thanks for your message! Only one thing I've to say. When I want to compare the costs per day with the average costs per week, I will have the same changes. So when I've got for example 340 euros on 3-9-2019, the average changes to 340. So the average is changing...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 07:40:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-on-weeklevel/m-p/1095686#M15969</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-19T07:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Average on weeklevel</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-on-weeklevel/m-p/3434772#M130304</link>
      <description>&lt;P&gt;Hey there! So, if you want to calculate the average costs per week, and you already have costs per day, you can use the DAX formula provided by AlB. The formula he gave you, CALCULATE( AVERAGE(Table1[Costs]), ALL(Table1[Datum]) ), will give you the average costs for the entire table, regardless of the date filter applied. This is because the ALL function removes any filters on the Datum column.&lt;/P&gt;
&lt;P&gt;However, if you're saying that when you filter to a specific day, like 3-9-2019, and the cost for that day is 340 euros, then the average also shows 340 euros, it's because the filter context is affecting the calculation. When you filter to a specific day, the average is being calculated only for that day, hence you get the same value as the cost for that day.&lt;/P&gt;
&lt;P&gt;To get the average costs for the entire week, even when you filter to a specific day, you need to modify the formula to ignore the day filter but respect the week filter. You can achieve this by using the ALLEXCEPT function. The formula would look something like this:&lt;/P&gt;
&lt;P&gt;Measure = CALCULATE( AVERAGE(Table1[Costs]), ALLEXCEPT(Table1, Table1[Week]) )&lt;/P&gt;
&lt;P&gt;With this formula, when you filter to a specific day, it will still give you the average costs for the entire week of that day. Hope this helps! If you have any other questions or need further clarification, just let me know!&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 17:40:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-on-weeklevel/m-p/3434772#M130304</guid>
      <dc:creator>technolog</dc:creator>
      <dc:date>2023-09-17T17:40:43Z</dc:date>
    </item>
  </channel>
</rss>

