<?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: Segment and Cumulative Segment Banding in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587130#M138410</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="487410" data-lia-user-login="domtrump" class="lia-mention lia-mention-user"&gt;domtrump&lt;/a&gt;&amp;nbsp;not sure what you really need, but another example for running total on &lt;A href="https://www.sqlbi.com/articles/computing-running-totals-in-dax/" target="_self"&gt;link&lt;/A&gt; is useful (part&amp;nbsp;&lt;SPAN&gt;RT Sales Customer Class)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Dec 2023 23:30:52 GMT</pubDate>
    <dc:creator>some_bih</dc:creator>
    <dc:date>2023-12-16T23:30:52Z</dc:date>
    <item>
      <title>Segment and Cumulative Segment Banding</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587005#M138392</link>
      <description>&lt;P&gt;I use banding all the time to group customers into segments. Very easy.&amp;nbsp;But I also have a need to group those bands in a cumulative matrix such that each band has a cumulative total inclusive of the bands above it. You can see the example below:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;How would I write the DAX to produce the matrix on the right from the data on the left?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2023 18:51:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587005#M138392</guid>
      <dc:creator>domtrump</dc:creator>
      <dc:date>2023-12-16T18:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Segment and Cumulative Segment Banding</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587016#M138396</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="487410" data-lia-user-login="domtrump" class="lia-mention lia-mention-user"&gt;domtrump&lt;/a&gt;&amp;nbsp; not enought data for example so please check &lt;A href="https://www.daxpatterns.com/dynamic-segmentation/" target="_self"&gt;link&lt;/A&gt; for some ideas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2023 19:28:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587016#M138396</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-12-16T19:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Segment and Cumulative Segment Banding</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587035#M138399</link>
      <description>&lt;P&gt;Hmmm. let's try another way just using the basic banding example (I copied this example off the web into my OneNote probably 20+ years ago - it came from this website if it still exists &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;&lt;A href="https://exceleratorbi.com.au/banding-in-dax/" target="_blank" rel="noopener"&gt;https://exceleratorbi.com.au/banding-in-dax/&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Process for Creating Banding&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The better way involves the following process.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a table in Excel that contains the group names and the lower/upper age limits&lt;/LI&gt;&lt;LI&gt;Load the table to Power Pivot&lt;/LI&gt;&lt;LI&gt;Do not connect the table to any other tables – it is a disconnected table&lt;/LI&gt;&lt;LI&gt;Write a DAX Calculated Column that compares the age of each customer against the lower/upper limits in your disconnected table and returns the single row from the banding table that matches for each customer.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here is the detail of how to do it.&lt;/P&gt;&lt;P&gt;Create a Table in Excel&lt;/P&gt;&lt;P&gt;Here is what a table in Excel looks like.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The key features to note are&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;There is and ID column – this will be used to sort the Band column later&lt;/LI&gt;&lt;LI&gt;A “Band” column – this is the label that describes each group.&amp;nbsp; Note the groups are mutually exclusive and collectively exhaustive (&lt;A href="https://en.wikipedia.org/wiki/MECE_principle" target="_blank" rel="noopener"&gt;MECE&lt;/A&gt;).&lt;/LI&gt;&lt;LI&gt;There is a “from” and “to” column that set the lower and upper bounds of each age group.&amp;nbsp; Note that the upper age for one group will match the lower age for the next group.&amp;nbsp; I have used DAX to ensure no overlap in the Calculated Column.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Write a Calculated Column&lt;/P&gt;&lt;P&gt;The objective of the calculated column is to filter the disconnected Banding table so that 1 and only 1 row is “visible” or “unfiltered” for each customer.&amp;nbsp; Here is the formula&lt;/P&gt;&lt;P&gt;= CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp;VALUES(AgeBands[Band]),&lt;/P&gt;&lt;P&gt;&amp;nbsp;FILTER(AgeBands,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Customers[Age] &amp;gt; AgeBands[From] &amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Customers[Age] &amp;lt;= AgeBands[To]&lt;/P&gt;&lt;P&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;)&lt;BR /&gt;&lt;BR /&gt;The new calculated column could then be placed in a pivot table to get the number of customers in each age grouping. Easy stuff.&lt;BR /&gt;&lt;BR /&gt;What I now need is a pivot table that would use similar grouping but instead of grouping into ranges with a top and bottom value, each segment would have a floor but no ceiling. So I could see&lt;BR /&gt;-# customers over 60 (customers in the 60+ band)&lt;/P&gt;&lt;P&gt;-# customers over 50 (customers in the 50-59 band PLUS&amp;nbsp;customers in the 60+ band)&lt;/P&gt;&lt;P&gt;-# customers over 40 (customers in the 40-49 band PLUS&amp;nbsp;customers in the 50-59 band PLUS&amp;nbsp;customers in the 60+ band)&lt;BR /&gt;&lt;SPAN&gt;and so on...&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope that helps clarify. If not, let me know what else would be helpful.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2023 20:26:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587035#M138399</guid>
      <dc:creator>domtrump</dc:creator>
      <dc:date>2023-12-16T20:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Segment and Cumulative Segment Banding</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587130#M138410</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="487410" data-lia-user-login="domtrump" class="lia-mention lia-mention-user"&gt;domtrump&lt;/a&gt;&amp;nbsp;not sure what you really need, but another example for running total on &lt;A href="https://www.sqlbi.com/articles/computing-running-totals-in-dax/" target="_self"&gt;link&lt;/A&gt; is useful (part&amp;nbsp;&lt;SPAN&gt;RT Sales Customer Class)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2023 23:30:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587130#M138410</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-12-16T23:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Segment and Cumulative Segment Banding</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587168#M138414</link>
      <description>&lt;P&gt;Not sure what other information I can provide to illustrate? I already have a calculated column that puts the customers into an AGE RANGE (such as age 40-49 or 50-59 or 60+). I can easily produce the counts of customers that are in each of the AGE RANGE segments. I want to create a &lt;STRONG&gt;new&lt;/STRONG&gt; calculated column that defines them into a &lt;STRONG&gt;new&lt;/STRONG&gt; segmentation based on whether or not they are equal to or above a certain age. (i.e. 50+ would be a segment for any patron over 50. this would include the 50-59 AND the 60+ patrons from the example&amp;nbsp; just gave).&lt;BR /&gt;Here's a summary of the data model for this example:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So it is just a matter of how to write the DAX in such a way to create these new "buckets" (or groups or segments or cohorts) at the lower levels would include everyone in the levels above it (i.e. 30+ would include anyone 30-39 as well as 40+ and so on).&lt;/P&gt;&lt;P&gt;I could certaily accomplish this with a long IF statement or SWITCH but I was looking for a more eloquent method using something similar to the banding technique.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Let me know if this sheds further clarity or if there is anything else I can post. The link to running totals looks like it might be useful for time-based calculations but not sure how I would apply it to this scenario. Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2023 00:34:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587168#M138414</guid>
      <dc:creator>domtrump</dc:creator>
      <dc:date>2023-12-17T00:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Segment and Cumulative Segment Banding</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587344#M138435</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="487410" data-lia-user-login="domtrump" class="lia-mention lia-mention-user"&gt;domtrump&lt;/a&gt;&amp;nbsp;I will think about it/your case&lt;/P&gt;</description>
      <pubDate>Sun, 17 Dec 2023 08:31:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3587344#M138435</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-12-17T08:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Segment and Cumulative Segment Banding</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3588877#M138530</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="487410" data-lia-user-login="domtrump" class="lia-mention lia-mention-user"&gt;domtrump&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In enclosed file you can find possible solution for Measure Count.&lt;/P&gt;
&lt;P&gt;This measure is based on another measures Count 21+ and other, which is based on calculated column Band in Fact table as following&lt;BR /&gt;=IF([Age]&amp;gt;=60;"60+";&lt;BR /&gt;IF(AND([Age]&amp;gt;=50;[Age]&amp;lt;60);"50+";&lt;BR /&gt;IF(AND([Age]&amp;gt;=40;[Age]&amp;lt;50);"40+";&lt;BR /&gt;IF(AND([Age]&amp;gt;=21;[Age]&amp;lt;40);"21+";&lt;BR /&gt;"21+"))))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Picture for pivot as solution&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Picture for Fact table column Band&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 12:34:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Segment-and-Cumulative-Segment-Banding/m-p/3588877#M138530</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-12-18T12:34:39Z</dc:date>
    </item>
  </channel>
</rss>

