<?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 FILTER IN GROUP BY in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-IN-GROUP-BY/m-p/2390615#M62158</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just started working with DAX and I came across something and I'm a bit stuck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to use a filter function when using group by? I've been searching for it for days but couldn't find anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to group my data by date, usr_id, shift, rate_type and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do a sum of the total seconds column where column rate type starts with "replens" and column actcod="GENMOV" and "CASRPL"&lt;/P&gt;&lt;P&gt;do a count of rows where column actcod = "CASRPL" and column Time over/under = "Time Under 5".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i am struggling to understand is how to apply a different fitler for those 2 aggregations&amp;nbsp;&lt;BR /&gt;I want a filter on sum and a different filter on count.&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;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 13 Mar 2022 19:21:01 GMT</pubDate>
    <dc:creator>georgec96</dc:creator>
    <dc:date>2022-03-13T19:21:01Z</dc:date>
    <item>
      <title>FILTER IN GROUP BY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-IN-GROUP-BY/m-p/2390615#M62158</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just started working with DAX and I came across something and I'm a bit stuck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to use a filter function when using group by? I've been searching for it for days but couldn't find anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to group my data by date, usr_id, shift, rate_type and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;do a sum of the total seconds column where column rate type starts with "replens" and column actcod="GENMOV" and "CASRPL"&lt;/P&gt;&lt;P&gt;do a count of rows where column actcod = "CASRPL" and column Time over/under = "Time Under 5".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What i am struggling to understand is how to apply a different fitler for those 2 aggregations&amp;nbsp;&lt;BR /&gt;I want a filter on sum and a different filter on count.&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;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Mar 2022 19:21:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-IN-GROUP-BY/m-p/2390615#M62158</guid>
      <dc:creator>georgec96</dc:creator>
      <dc:date>2022-03-13T19:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: FILTER IN GROUP BY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-IN-GROUP-BY/m-p/2390690#M62166</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;Here is one way to do this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;TWO CALC COLUMNS&lt;/P&gt;&lt;P&gt;A = IF(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; AND( LEFT( Table[rate-type], 7) = “replens”,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table[actcod] = “GENMOV”),&lt;BR /&gt;&amp;nbsp;&amp;nbsp; SUM(Table[Total Seconds], BLANK()&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B =IF(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; AND(Table[actcod] = “CASRPL”,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table[Time over/under] = “Time Under 5”),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 1), BLANK()&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TWO Measures&lt;/P&gt;&lt;P&gt;Sum A = SUM(Table[A])&lt;/P&gt;&lt;P&gt;SumB =SUM(Table[B])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could potentially just have two measures where you can have variables for the conditions&lt;/P&gt;&lt;P&gt;But here you can see what is occurring a bit easier.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Mar 2022 20:39:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/FILTER-IN-GROUP-BY/m-p/2390690#M62166</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-03-13T20:39:27Z</dc:date>
    </item>
  </channel>
</rss>

