<?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 get the dynamic ranges based on the table in SSAS tabular model in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-the-dynamic-ranges-based-on-the-table-in-SSAS-tabular-model/m-p/2031387#M45551</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Need help in SSAS tabular model&lt;/P&gt;&lt;P&gt;I am having one product table with the below details:&amp;nbsp;&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;I have created one custom table in SSAS&lt;/P&gt;&lt;P&gt;DEFINE TABLE Ranges= DATATABLE (&lt;BR /&gt;"Ranges", STRING,&lt;BR /&gt;&lt;BR /&gt;"Min Range", INTEGER,&lt;BR /&gt;"Max Range", INTEGER,&lt;BR /&gt;{&lt;BR /&gt;{"0-10", 0, 10 },&lt;BR /&gt;{ "10-30",10, 30 },&lt;BR /&gt;{ "30-60",30, 60 },&lt;BR /&gt;{ "&amp;gt;60",60, 100 }&lt;BR /&gt;}&lt;BR /&gt;)&lt;BR /&gt;EVALUATE Ranges&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get the range from range table based on the below condition&lt;/P&gt;&lt;P&gt;i&lt;/P&gt;&lt;P&gt;product[sales]&amp;gt;minrange &amp;amp;&amp;amp; sales &amp;lt;max range then range&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;final output table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks In Advance&lt;/P&gt;</description>
    <pubDate>Mon, 23 Aug 2021 07:08:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-08-23T07:08:30Z</dc:date>
    <item>
      <title>get the dynamic ranges based on the table in SSAS tabular model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-the-dynamic-ranges-based-on-the-table-in-SSAS-tabular-model/m-p/2031387#M45551</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Need help in SSAS tabular model&lt;/P&gt;&lt;P&gt;I am having one product table with the below details:&amp;nbsp;&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;I have created one custom table in SSAS&lt;/P&gt;&lt;P&gt;DEFINE TABLE Ranges= DATATABLE (&lt;BR /&gt;"Ranges", STRING,&lt;BR /&gt;&lt;BR /&gt;"Min Range", INTEGER,&lt;BR /&gt;"Max Range", INTEGER,&lt;BR /&gt;{&lt;BR /&gt;{"0-10", 0, 10 },&lt;BR /&gt;{ "10-30",10, 30 },&lt;BR /&gt;{ "30-60",30, 60 },&lt;BR /&gt;{ "&amp;gt;60",60, 100 }&lt;BR /&gt;}&lt;BR /&gt;)&lt;BR /&gt;EVALUATE Ranges&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get the range from range table based on the below condition&lt;/P&gt;&lt;P&gt;i&lt;/P&gt;&lt;P&gt;product[sales]&amp;gt;minrange &amp;amp;&amp;amp; sales &amp;lt;max range then range&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;final output table:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks In Advance&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 07:08:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-the-dynamic-ranges-based-on-the-table-in-SSAS-tabular-model/m-p/2031387#M45551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-23T07:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: get the dynamic ranges based on the table in SSAS tabular model</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-the-dynamic-ranges-based-on-the-table-in-SSAS-tabular-model/m-p/2031771#M45564</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the following calculated column should do that:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Range =
VAR vRowSales = 'product table'[sales]
RETURN
    CALCULATE(
        MAX( Ranges[Ranges] ),
        Ranges[Min Range] &amp;lt; vRowSales &amp;amp;&amp;amp; vRowSales &amp;lt;= Ranges[Max Range]
    )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Be aware that you are not clear with your definition of the beginning/endings of the ranges. As a user I would expect the sales of 10 to appear in both ranges (0-10 and 10-30) as both include 10.&lt;/P&gt;&lt;P&gt;Maybe you should do the ranges like 0-10, 11-30, 31-60, &amp;gt;60&lt;/P&gt;&lt;P&gt;Like this it would be clear in which range which number belongs to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;If you need any help please let me know.&lt;/DIV&gt;&lt;DIV&gt;If I answered your question I would be happy if you could mark my post as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; and give it a thumbs up &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Best regards&lt;/DIV&gt;&lt;DIV&gt;Denis&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Blog: &lt;A title="Click here!" href="https://whatthefact.bi/?utm_source=powerbicommunity&amp;amp;utm_medium=link&amp;amp;utm_campaign=forum" target="_blank" rel="noopener"&gt;&lt;U&gt;WhatTheFact.bi&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;Follow me: &lt;A title="Click here!" href="https://twitter.com/DenSelimovic" target="_blank" rel="noopener"&gt;&lt;U&gt;twitter.com/DenSelimovic&lt;/U&gt;&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Aug 2021 09:23:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/get-the-dynamic-ranges-based-on-the-table-in-SSAS-tabular-model/m-p/2031771#M45564</guid>
      <dc:creator>selimovd</dc:creator>
      <dc:date>2021-08-23T09:23:36Z</dc:date>
    </item>
  </channel>
</rss>

