<?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: DAX Filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3390298#M127811</link>
    <description>&lt;P&gt;Thanks for your response!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be more clear, I have two tables: "Times" and "Output".&amp;nbsp; There is a name, order no. ,order no. milestone and hours column in the Times table. Each Order No. has many milestones and I am trying to sum the hours column in the Times table to find the total hours each user has spent on each order no. milestone&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The calculation is to be displayed in a new column of the times table. I can successfully calculate a sum without filters e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;John Smith = &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Times'&lt;/SPAN&gt;&lt;SPAN&gt;[Hours]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But with filters there is no output (columns are blank) even though there are no error messages displayed. Obviously I expect an output with the summed hours.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Order No. left &amp;amp; Times Table right:&amp;nbsp;&lt;img /&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 21 Aug 2023 13:34:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-21T13:34:12Z</dc:date>
    <item>
      <title>DAX Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3387354#M127660</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to filter another table using the formula below. Is there a way to make this work using the filters. I can calculate the sum when the filter is not applied. Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;John Smith =&lt;BR /&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Times'&lt;/SPAN&gt;&lt;SPAN&gt;[Hours]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Times'&lt;/SPAN&gt;&lt;SPAN&gt;[Name]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"John Smith")&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 18 Aug 2023 12:32:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3387354#M127660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-18T12:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3387410#M127662</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you say, "&lt;SPAN&gt;I can calculate the sum when the filter is not applied", do you mean that measure 01 below works, but measure 02 does not?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;01&amp;nbsp;&lt;/SPAN&gt;Total Hours =&lt;/P&gt;&lt;DIV&gt;CALCULATE(&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;SUM('Times'[Hours]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;)&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;02 John Smith =&lt;/DIV&gt;&lt;DIV&gt;CALCULATE(&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;SUM('Times'[Hours]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;'Times'[Name] = "John Smith"&lt;/DIV&gt;&lt;DIV&gt;)&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Can you be more specific in how measure 02 is not working?&amp;nbsp; (I'm not understanding the problem.)&lt;/DIV&gt;&lt;DIV&gt;- Is there an error?&lt;/DIV&gt;&lt;DIV&gt;- If the problem is undesired results, can you include a screenshot of the result you are getting, and also a screenshot of the expected result (e.g. Excel mock-up)?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Nathan&lt;/DIV&gt;</description>
      <pubDate>Fri, 18 Aug 2023 12:59:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3387410#M127662</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2023-08-18T12:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3390298#M127811</link>
      <description>&lt;P&gt;Thanks for your response!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be more clear, I have two tables: "Times" and "Output".&amp;nbsp; There is a name, order no. ,order no. milestone and hours column in the Times table. Each Order No. has many milestones and I am trying to sum the hours column in the Times table to find the total hours each user has spent on each order no. milestone&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The calculation is to be displayed in a new column of the times table. I can successfully calculate a sum without filters e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;John Smith = &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Times'&lt;/SPAN&gt;&lt;SPAN&gt;[Hours]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But with filters there is no output (columns are blank) even though there are no error messages displayed. Obviously I expect an output with the summed hours.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Order No. left &amp;amp; Times Table right:&amp;nbsp;&lt;img /&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 21 Aug 2023 13:34:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3390298#M127811</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-21T13:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3391080#M127838</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for this information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Hopefully I am not misunderstanding you, but it sounds like "Output" is not actually a &lt;U&gt;&lt;STRONG&gt;data table&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;in the model like "Times", but simply a &lt;U&gt;&lt;STRONG&gt;table visual&lt;/STRONG&gt;&lt;/U&gt;.&amp;nbsp; As a result, I have created a model with only 1 table for "Times".&amp;nbsp; (If this is incorrect, please specify the columns and corresponding sample data for the "Output" data table.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) To sum the hours column in the Times table to get the total hours each user spent on each milestone, I created 2 measures &amp;amp; dragged them onto a table visual.&lt;/P&gt;&lt;P&gt;&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;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, this table visual result set matches your desired output screenshot from Excel.&lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) The main thing that confuses me is that you specify: "the calculation is to be displayed in a new COLUMN of the times table."&amp;nbsp; Calculated Columns operate in the RC (Row Context).&amp;nbsp; As a result, if you do this, you will not get the output you are looking for because your output summarizes (or groups by) the Order No. &amp;amp; Milestone.&amp;nbsp; But the 'Times' table does not do this because of the presence of the [Name] column.&amp;nbsp; For this reason, to get the output that matches your screenshot, I used 2 measures within a table visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully this is helpful to you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 21:37:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3391080#M127838</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2023-08-21T21:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3392352#M127911</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="340078" data-lia-user-login="WinterMist" class="lia-mention lia-mention-user"&gt;WinterMist&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry I am still very new to Power BI but I appreciate you taking the time. The entire Times table receives input to SQL Server from power apps whilst the Output table requires input for only the following fields:&amp;nbsp;Order No., Milestone, Description, SO Type, MS Type, Project Leader, Planned Hrs, Design Due Date, Production Milestone, Completed, Reason For Late, Hrs Variance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following fields in the output table were initially calculated using excel but are to be calculated using Power BI:&amp;nbsp;Days Late, Status, Open Late, Req'd Month, Req'd Year, Past(1)/Present(0), Comp Wk No, Comp Yr, User e.g. "John Smith", Total Hrs, Variance, % Var, -MONTH, Current.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have managed all calculations besides the user fields in the output table (e.g. Brian Wiles column). This is what I meant by a new column to display the sum output. This way a user will be able to view the output tables as it was on excel. Is it possible to achieve this? I don't see why not since it can be done on excel and SQL?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 11:22:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3392352#M127911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-22T11:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3393352#M127968</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No worries.&amp;nbsp; I'm learning just like you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To clarify, you &lt;U&gt;&lt;STRONG&gt;&lt;EM&gt;CAN&lt;/EM&gt; &lt;/STRONG&gt;&lt;/U&gt;create CC's (Calculated Columns) in the 'Times' table.&lt;/P&gt;&lt;P&gt;I was simply saying that the result won't look like your screenshot of desired results.&lt;/P&gt;&lt;P&gt;- Your desired result screenshot presents 5 rows of data on only 3 rows (Grouping By Order No. &amp;amp; Milestone)&lt;/P&gt;&lt;P&gt;- The data table 'Times' does not group because it's a data table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regardless, below is how to create the CC's:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: When creating multiple CC's in the same table (which use CALCULATE), this creates a Circular Dependency.&amp;nbsp; To get around this you have to use ALLEXCEPT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the data view of the 'Times' table along with the 2 added CC's.&lt;/P&gt;&lt;P&gt;&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;Hope this is helpful to you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 20:07:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3393352#M127968</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2023-08-22T20:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3394269#M128015</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="340078" data-lia-user-login="WinterMist" class="lia-mention lia-mention-user"&gt;WinterMist&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have implemented your code which has no errors but still fails to produce the desired code (still producing blanks despite valid data). I think the issue may not even be the code since you achieve the desired result yourself? I have attached the Times table (top) and Output table (bottom). Cheers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 08:29:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3394269#M128015</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-23T08:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3397409#M128189</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="340078" data-lia-user-login="WinterMist" class="lia-mention lia-mention-user"&gt;WinterMist&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have now solved the problem using the last code you provided and by creating a new calculated column with milestone and Order Number concatenated to form a single ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2023 15:49:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Filter/m-p/3397409#M128189</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-24T15:49:30Z</dc:date>
    </item>
  </channel>
</rss>

