<?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: Make averagex to work properly with dimensions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-averagex-to-work-properly-with-dimensions/m-p/3103771#M109239</link>
    <description>&lt;P&gt;I get an error saying I cant use COALESCE. (The engine is SSAS 2019)&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 13:40:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-02-28T13:40:04Z</dc:date>
    <item>
      <title>Make averagex to work properly with dimensions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-averagex-to-work-properly-with-dimensions/m-p/3103268#M109203</link>
      <description>&lt;P&gt;I have my measure where I am trying to display an average... The average should change by month and of course take into account BLANKS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, if I have data:&lt;/P&gt;&lt;P&gt;June: 3&lt;/P&gt;&lt;P&gt;July: 4&lt;/P&gt;&lt;P&gt;August: BLANK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to see (for the selected month):&lt;/P&gt;&lt;P&gt;June: 3&lt;/P&gt;&lt;P&gt;July: 3,5&amp;nbsp;&lt;/P&gt;&lt;P&gt;August: 2,333&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To achieve this I use&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;CALCULATE (&amp;nbsp; [Users Avg Months] ,DATESYTD('Date'[Date] ,"31/05")&amp;nbsp; )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works fine with TOTALS!! ; but when I drag "user type" from&amp;nbsp; Dimension it works wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Users:=CALCULATE(SUM(Users[Actual]), FILTER('User Type', ' User Type'[C Or A] IN {"A"} ))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Users Avg Months:= AVERAGEX (   VALUES('Date'[DW_SK_Date]),[Users]  )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 09:48:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-averagex-to-work-properly-with-dimensions/m-p/3103268#M109203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-28T09:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Make averagex to work properly with dimensions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-averagex-to-work-properly-with-dimensions/m-p/3103322#M109208</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Users Avg Months :=
AVERAGEX ( VALUES ( 'Date'[DW_SK_Date] ), COALESCE ( [Users], 0 ) )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Feb 2023 10:13:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-averagex-to-work-properly-with-dimensions/m-p/3103322#M109208</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-28T10:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Make averagex to work properly with dimensions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-averagex-to-work-properly-with-dimensions/m-p/3103771#M109239</link>
      <description>&lt;P&gt;I get an error saying I cant use COALESCE. (The engine is SSAS 2019)&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 13:40:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-averagex-to-work-properly-with-dimensions/m-p/3103771#M109239</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-28T13:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Make averagex to work properly with dimensions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-averagex-to-work-properly-with-dimensions/m-p/3103851#M109247</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;Users Avg Months :=&lt;BR /&gt;AVERAGEX ( VALUES ( 'Date'[DW_SK_Date] ), [Users] + 0 )&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 14:25:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Make-averagex-to-work-properly-with-dimensions/m-p/3103851#M109247</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-28T14:25:07Z</dc:date>
    </item>
  </channel>
</rss>

