<?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 Calculatetable then filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatetable-then-filter/m-p/2036681#M45693</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="212414" data-lia-user-login="scurrp" class="lia-mention lia-mention-user"&gt;scurrp&lt;/a&gt; , I think you very similar to what I have done here&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dynamic Segmentation Bucketing Binning&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Dynamic Segmentation, Bucketing or Binning: &lt;A href="https://youtu.be/CuczXPj0N-k" target="_blank"&gt;https://youtu.be/CuczXPj0N-k&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Aug 2021 06:02:42 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2021-08-25T06:02:42Z</dc:date>
    <item>
      <title>DAX Calculatetable then filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatetable-then-filter/m-p/2036526#M45690</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;I'm trying to calculate the count of records that fall within range criteria.&lt;/P&gt;&lt;P&gt;My approach was to calculate the table of results that I need to count.&lt;BR /&gt;This is the CustomerID and the Visit%. Visit% this, in turn, is a measure of actual vs plan.&lt;BR /&gt;Then I have a junk dimension&amp;nbsp;&lt;SPAN&gt;dimCustomerVisitCategory, with min and max range values.&lt;BR /&gt;The next step is where I get stuck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to count the rows of the calculated table where the visit % is between the min and max range values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The problem I'm finding is that&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1- all records are getting allocated to 1 category&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2 - the number of records is higher than expected ie 67 vs 8.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance for any assistance.&lt;/SPAN&gt;&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;xx = 
var IIS = ISINSCOPE(dimCustomerVisitCategory[Customer Visit Categories])
var Mn = MIN(dimCustomerVisitCategory[MinRange])
var Mx = Max(dimCustomerVisitCategory[MaxRange])
VAR CustVisitAvg =
 CALCULATETABLE (
 ADDCOLUMNS (
 SUMMARIZE ( fact_CustomerVisits, fact_CustomerVisits[CustomerID] ),
 "Customervisitpc", [Visit %]))

var CR = COUNTROWS( FILTER(CustVisitAvg,[Customervisitpc] &amp;gt;= mn &amp;amp;&amp;amp; [Customervisitpc] &amp;lt; mx) )+0
return
Switch( true(),
IIS, CR
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 05:49:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatetable-then-filter/m-p/2036526#M45690</guid>
      <dc:creator>scurrp</dc:creator>
      <dc:date>2021-08-25T05:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculatetable then filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatetable-then-filter/m-p/2036681#M45693</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="212414" data-lia-user-login="scurrp" class="lia-mention lia-mention-user"&gt;scurrp&lt;/a&gt; , I think you very similar to what I have done here&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dynamic Segmentation Bucketing Binning&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Dynamic Segmentation, Bucketing or Binning: &lt;A href="https://youtu.be/CuczXPj0N-k" target="_blank"&gt;https://youtu.be/CuczXPj0N-k&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 06:02:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatetable-then-filter/m-p/2036681#M45693</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-08-25T06:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Calculatetable then filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatetable-then-filter/m-p/2038857#M45759</link>
      <description>&lt;P&gt;I think my biggest problem was not naming the problem correctly.&lt;BR /&gt;I tried implementing the proposed solution, with some strange results.&lt;BR /&gt;Knowing the correct name of the problem I went to&amp;nbsp;&lt;A href="https://www.daxpatterns.com/dynamic-segmentation/" target="_blank" rel="noopener"&gt;daxpatterns -dynamic segmentation&lt;/A&gt;&amp;nbsp;and was able to implement that pattern successfully.&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 22:23:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Calculatetable-then-filter/m-p/2038857#M45759</guid>
      <dc:creator>scurrp</dc:creator>
      <dc:date>2021-08-25T22:23:32Z</dc:date>
    </item>
  </channel>
</rss>

