<?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: alternative to calendar table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3633421#M140531</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;, below is the formula to count distinct id which is the giving hard time&lt;/P&gt;&lt;P&gt;Schools* = CALCULATE(DISTINCTCOUNTNOBLANK('Query1'[ID]),&lt;BR /&gt;FILTER('Query1',&lt;BR /&gt;('Query1'[close_date].[Date]&amp;gt;= [MinDate] &amp;amp;&amp;amp; 'Query1'[close_date].[Year]&amp;gt;= 2013 || ISBLANK('Query1'[close_date])) &amp;amp;&amp;amp;&lt;BR /&gt;'Query1'[open_date].[Date]&amp;lt;=[MaxDate] &amp;amp;&amp;amp;&lt;BR /&gt;('Query1'[Date All School Closed].[Date]&amp;gt;= [MinDate] &amp;amp;&amp;amp; 'Query1'[Date All School Closed].[Year]&amp;gt;= 2013 || ISBLANK('Query1'[Date All School Closed])) &amp;amp;&amp;amp;&lt;BR /&gt;'Query1'[First Date Any School Opened].[Date]&amp;lt;=[MaxDate]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2024 13:10:49 GMT</pubDate>
    <dc:creator>bharosha</dc:creator>
    <dc:date>2024-01-11T13:10:49Z</dc:date>
    <item>
      <title>alternative to calendar table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3631003#M140444</link>
      <description>&lt;P&gt;I need a min date and max date that can be used to derive other calculations. Currently I have a calendar table&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Dates =&lt;/SPAN&gt; &lt;SPAN&gt;Calendar&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Date&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;1995&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;), today())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I used min date =&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Min&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dates&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dates&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;and max date =&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dates&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Dates&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I use date column from dates calendar table to create a date filter and use min value and max value to derive count calculation that changes as I change the date filter.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;The counts and other statistics takes forever to load because of all the date table. Is there an alternative way to do it? date filter whose min value and max value can be used for the calculations.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Jan 2024 16:41:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3631003#M140444</guid>
      <dc:creator>bharosha</dc:creator>
      <dc:date>2024-01-10T16:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: alternative to calendar table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3631231#M140449</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="578737" data-lia-user-login="bharosha" class="lia-mention lia-mention-user"&gt;bharosha&lt;/a&gt;&amp;nbsp;Can you just use MIN('Dates'[Date]) and MAX('Dates'[Date]) ?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:52:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3631231#M140449</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-01-10T18:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: alternative to calendar table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3631319#M140453</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;, Even though I changed it to just min and max, the count, average, median still takes forever to load. Is there any alternative to calendar table? Is there any way to use user input date filter which min and max value can be used in the calculation?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 19:56:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3631319#M140453</guid>
      <dc:creator>bharosha</dc:creator>
      <dc:date>2024-01-10T19:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: alternative to calendar table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3631594#M140470</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="578737" data-lia-user-login="bharosha" class="lia-mention lia-mention-user"&gt;bharosha&lt;/a&gt;&amp;nbsp;I have my doubts that it is the dates causing a problem here. I mean, 2024 to 1995 would only be approximately 10,585 dates. What does the rest of your formula/formulas look like?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 00:50:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3631594#M140470</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-01-11T00:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: alternative to calendar table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3633421#M140531</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;, below is the formula to count distinct id which is the giving hard time&lt;/P&gt;&lt;P&gt;Schools* = CALCULATE(DISTINCTCOUNTNOBLANK('Query1'[ID]),&lt;BR /&gt;FILTER('Query1',&lt;BR /&gt;('Query1'[close_date].[Date]&amp;gt;= [MinDate] &amp;amp;&amp;amp; 'Query1'[close_date].[Year]&amp;gt;= 2013 || ISBLANK('Query1'[close_date])) &amp;amp;&amp;amp;&lt;BR /&gt;'Query1'[open_date].[Date]&amp;lt;=[MaxDate] &amp;amp;&amp;amp;&lt;BR /&gt;('Query1'[Date All School Closed].[Date]&amp;gt;= [MinDate] &amp;amp;&amp;amp; 'Query1'[Date All School Closed].[Year]&amp;gt;= 2013 || ISBLANK('Query1'[Date All School Closed])) &amp;amp;&amp;amp;&lt;BR /&gt;'Query1'[First Date Any School Opened].[Date]&amp;lt;=[MaxDate]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 13:10:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3633421#M140531</guid>
      <dc:creator>bharosha</dc:creator>
      <dc:date>2024-01-11T13:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: alternative to calendar table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3642840#M141038</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="578737" data-lia-user-login="bharosha" class="lia-mention lia-mention-user"&gt;bharosha&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please &lt;STRONG&gt;update&lt;/STRONG&gt; the formula of measure [Schools*] as below and check if it can return the expected result...&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Schools* =
VAR _seldate =
    SELECTEDVALUE ( Dates[Date] )
RETURN
    CALCULATE (
        DISTINCTCOUNTNOBLANK ( 'Query1'[ID] ),
        FILTER (
            'Query1',
            (
                (
                    'Query1'[close_date] &amp;gt;= _seldate
                        &amp;amp;&amp;amp; YEAR ( 'Query1'[close_date] ) &amp;gt;= 2013
                )
                    || ISBLANK ( 'Query1'[close_date] )
            )
                &amp;amp;&amp;amp; 'Query1'[open_date] &amp;lt;= _seldate
                &amp;amp;&amp;amp; (
                    (
                        'Query1'[Date All School Closed] &amp;gt;= _seldate
                            &amp;amp;&amp;amp; YEAR ( 'Query1'[Date All School Closed] ) &amp;gt;= 2013
                    )
                        || ISBLANK ( 'Query1'[Date All School Closed] )
                            &amp;amp;&amp;amp; 'Query1'[First Date Any School Opened] &amp;lt;= _seldate
                )
        )
    )&lt;/LI-CODE&gt;
&lt;P&gt;If the above ones can't help you get the expected result,&amp;nbsp;&lt;SPAN&gt;please provide some&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;raw data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in your table 'Query1' (&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;) with&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;format and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with special examples and screenshots base on provided sample data.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;It would be helpful to find out the solution. You can refer the following link to share the required info:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C01%7CClaire.Dong%40microsoft.com%7Cada9149bd91546a8432508dacd31ef9b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638047911607737134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=EJlYfclgtrjgAEYj9Uo1AauqxaQm3hlQsjJMo4zCY1M%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;pbix file. You can refer the following link to upload the file to the community. Thank you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 07:22:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3642840#M141038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-17T07:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: alternative to calendar table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3643774#M141094</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="17425" data-lia-user-login="VS" class="lia-mention lia-mention-user"&gt;VS&lt;/a&gt;&amp;nbsp;, It did not work. The output is 0 with this formula. there is no minimum and maximum value here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below would not work because it is calculating off of same value. Please advise. The file is a huge file and full of sensitive data.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;'Query1'[close_date] &amp;gt;= _seldate
                &amp;amp;&amp;amp; 'Query1'[open_date] &amp;lt;= _seldate&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 17 Jan 2024 15:09:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3643774#M141094</guid>
      <dc:creator>bharosha</dc:creator>
      <dc:date>2024-01-17T15:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: alternative to calendar table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3647476#M141266</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="578737" data-lia-user-login="bharosha" class="lia-mention lia-mention-user"&gt;bharosha&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks for your feedback. Could you please provide some&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;raw data&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in your table 'Query1' (&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;exclude&amp;nbsp;sensitive&amp;nbsp;data&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;) with&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Text&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;format, the calculation logic and your&amp;nbsp;&lt;STRONG&gt;expected result&lt;/STRONG&gt;&amp;nbsp;with special examples and screenshots base on provided sample data?&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;It would be helpful to find out the solution. You can refer the following link to share the required info:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-provide-sample-data-in-the-Power-BI-Forum%2Fba-p%2F963216&amp;amp;data=05%7C01%7CClaire.Dong%40microsoft.com%7Cada9149bd91546a8432508dacd31ef9b%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638047911607737134%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=EJlYfclgtrjgAEYj9Uo1AauqxaQm3hlQsjJMo4zCY1M%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to provide sample data in the Power BI Forum&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;It is better&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;if you can share a&amp;nbsp;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;simplified&lt;/STRONG&gt;&amp;nbsp;&lt;/FONT&gt;pbix file. You can refer the following link to upload the file to the community. Thank you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FDesktop%2FHow-to-upload-PBI-in-Community%2Fm-p%2F1672886&amp;amp;data=04%7C01%7Cv-yiruan%40microsoft.com%7C4f580813734d4a8355b008da16f6e91a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637847547341062885%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;amp;sdata=YJvujige2YITXKbKED9JieQm5LBdf%2F3IYPM4ggdiijQ%3D&amp;amp;reserved=0" target="_blank" rel="nofollow noopener noreferrer"&gt;How to upload PBI in Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 07:20:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3647476#M141266</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-19T07:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: alternative to calendar table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3647879#M141281</link>
      <description>&lt;P&gt;&lt;BR /&gt;I suggest creating a dedicated 'TimeTable' that includes all relevant dates and incorporating it into your calculations. Below is the revised DAX code:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This approach ensures the availability of a comprehensive 'TimeTable,' enhancing the accuracy and efficiency of your calculations. Replace 'YourMeasureToAggregate' with your specific measure or calculation to customize the code for your exact requirements.&lt;/P&gt;&lt;P&gt;Let's go through a hypothetical example using the provided code and data:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FilteredMeasure =
VAR MinDate = CALCULATE(MIN('TimeTable'[Date]), ALLSELECTED('TimeTable'))
VAR MaxDate = CALCULATE(MAX('TimeTable'[Date]), ALLSELECTED('TimeTable'))

RETURN
CALCULATE(
YourMeasureToAggregate, -- Replace with your actual measure or calculation
DATESBETWEEN(
'TimeTable'[Date],
MinDate,
MaxDate
),
MaxDate - 'Query1'[close_date].[Date] &amp;gt; 0 &amp;amp;&amp;amp;
MaxDate - 'Query1'[close_date].[Date] &amp;lt; MaxDate - MinDate
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Data:&lt;/P&gt;&lt;P&gt;Minimum Date: 10&lt;BR /&gt;Maximum Date: 15&lt;BR /&gt;Close Date: 12&lt;BR /&gt;Open Date: 9&lt;BR /&gt;Calculation:&lt;BR /&gt;The aim is to find schools where the difference between the close date and the maximum date is exactly 3.&lt;/P&gt;&lt;P&gt;(Maximum Date - Close Date) = 15 - 12 = 3&lt;/P&gt;&lt;P&gt;Filtering:&lt;BR /&gt;We select schools where the condition (Maximum Date - Close Date) equals 3, and this condition is met when it is less than 5 (the difference between the maximum date and the minimum date).&lt;/P&gt;&lt;P&gt;Close Date: 9,&lt;BR /&gt;(Maximum Date - Close Date) = 15 - 9 = 6 (Not selected)&lt;/P&gt;&lt;P&gt;Close Date: 15,&lt;BR /&gt;(Maximum Date - Close Date) = 15 - 15 = 0 (Not selected)&lt;/P&gt;&lt;P&gt;Close Date: 11,&lt;BR /&gt;(Maximum Date - Close Date) = 15 - 11 = 4 (Selected)&lt;/P&gt;&lt;P&gt;I have not included other columns assuming that 'opened' is always supposed to be less than 'max date,' and since 'close' is also less than 'max,' 'open' will be automatically less.&lt;/P&gt;&lt;P&gt;If you provide the meanings of the '[Date All School Closed]' and '[First Date Any School Opened]' columns, we can consider how to incorporate them into the analysis.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2024 09:57:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/alternative-to-calendar-table/m-p/3647879#M141281</guid>
      <dc:creator>_elbpower</dc:creator>
      <dc:date>2024-01-19T09:57:05Z</dc:date>
    </item>
  </channel>
</rss>

