<?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: Filtering Dates from another table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4782043#M183116</link>
    <description>&lt;P&gt;If you refresh your calendar table in import mode daily you can implement these ranges/grains as calculated columns.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Jul 2025 01:25:10 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2025-07-31T01:25:10Z</dc:date>
    <item>
      <title>Filtering Dates from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4781768#M183102</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So I have been working through attempting to build logic for sales at different grains. r13w, r4w, py r13w, py r4w.&amp;nbsp; Our company has some custom logic for how we define weeks so we have a table put together that shows the week_end_date (calendardt), and each date that would fall into each aggregate for current year(rollupdt)/ Prior year(prioryeardt).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;We then have daily level sales data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have dax written that doe work to accomplish what I attempted to below:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;R1W Sales = CALCULATE(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;SUM('Sales Metrics - Weekly'[sales]),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;TREATAS(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;CALCULATETABLE(&lt;SPAN&gt;VALUES(time_rollup[rollupdt]),time_rollup[timerollupdimcd] = &lt;SPAN&gt;"r1w"),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Sales Metrics - Weekly'[invoice_dt]&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;))&lt;BR /&gt;&lt;BR /&gt;The current issue we are facing is with preformance, this is relatively slow.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was curious if anyone had a better/ more efficient way of grabbing the values from our timerollup table in order to create a similar measure.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 17:44:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4781768#M183102</guid>
      <dc:creator>riledup2021</dc:creator>
      <dc:date>2025-07-30T17:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Dates from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4781794#M183103</link>
      <description>&lt;P&gt;Can you please add the tables in a usable format so we can replicate the measure and improve the performance?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jul 2025 18:18:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4781794#M183103</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-07-30T18:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Dates from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4782043#M183116</link>
      <description>&lt;P&gt;If you refresh your calendar table in import mode daily you can implement these ranges/grains as calculated columns.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 01:25:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4782043#M183116</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-07-31T01:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Dates from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4782950#M183140</link>
      <description>&lt;P&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;/FONT&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1325269" data-lia-user-login="riledup2021" class="lia-mention lia-mention-user"&gt;riledup2021&lt;/a&gt;&lt;FONT&gt;&amp;nbsp;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;SPAN&gt;Thank you for reaching out to the Microsoft Community Forum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;SPAN&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;/FONT&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&lt;FONT&gt;&lt;FONT&gt;&amp;nbsp;,&amp;nbsp;&lt;/FONT&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1287762" data-lia-user-login="FBergamaschi" class="lia-mention lia-mention-user"&gt;FBergamaschi&lt;/a&gt;&lt;FONT&gt;&amp;nbsp;, Thank you for your prompt responses.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;&lt;SPAN&gt;&lt;FONT&gt;&lt;FONT&gt;&lt;FONT&gt;Hi&amp;nbsp;&lt;/FONT&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1325269" data-lia-user-login="riledup2021" class="lia-mention lia-mention-user"&gt;riledup2021&lt;/a&gt;&lt;FONT&gt;&amp;nbsp;,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Please try below two options to improve performance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Created Calculated column "IsR1W" to "time_rollup"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IsR1W = IF(time_rollup[timerollupdimcd] = "r1w", TRUE(), FALSE())&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please change you "R1W Sales" measure with below DAX code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT&gt;R1W Sales = CALCULATE(&lt;BR /&gt;SUM('Sales Metrics - Weekly'[sales]),&lt;BR /&gt;FILTER(&lt;BR /&gt;'Sales Metrics - Weekly',&lt;BR /&gt;'Sales Metrics - Weekly'[invoicedt] IN&lt;BR /&gt;CALCULATETABLE(&lt;BR /&gt;VALUES(time_rollup[rollupdt]),&lt;BR /&gt;time_rollup[IsR1W] = TRUE()&lt;/FONT&gt;&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT&gt;2. Create a date bridge table from "time_rollup", only include rows with "r1w" and their "rollupdt". Make relationship "rollupdt" --&amp;gt; "invoiced" directly in the model.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the time filter from Time_R1W&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;R1W Sales = SUM('Sales Metrics - Weekly'[sales])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;P&gt;I hope this information helps. Please do let us know if you have any further queries.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2025 12:06:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4782950#M183140</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-07-31T12:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Dates from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4787102#M183286</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1325269" data-lia-user-login="riledup2021" class="lia-mention lia-mention-user"&gt;riledup2021&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2025 17:29:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4787102#M183286</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-08-04T17:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Dates from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4791489#M183409</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1325269" target="_blank"&gt;@riledup2021&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 15:26:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4791489#M183409</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-08-08T15:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Dates from another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4793476#M183465</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1325269" target="_blank" rel="noopener"&gt;@riledup2021&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Dinesh&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 16:05:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-Dates-from-another-table/m-p/4793476#M183465</guid>
      <dc:creator>v-dineshya</dc:creator>
      <dc:date>2025-08-11T16:05:05Z</dc:date>
    </item>
  </channel>
</rss>

