<?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: Show results before and after a chosen date (when referencing two date tables) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-results-before-and-after-a-chosen-date-when-referencing-two/m-p/1743183#M36227</link>
    <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291038" data-lia-user-login="bdeluca" class="lia-mention lia-mention-user"&gt;bdeluca&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;From what I've got from your explanation is that you need 2 measures and a slicer.&lt;/P&gt;&lt;P&gt;Indeed, you need to create a dimention table to be used in your slicer that will contain all the dates from both tables. You can create it either in Power Query or DAX based on either provided start/end date or on min/max dates of youe existing fact tables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measures that might be used:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#Dataset_1 = 
VAR selectedDate = SELECTEDVALUE(Calendar[Date])
RETURN 
    SUMX(
        FILTER(ALL(Dataset1), Dataset1[Date] &amp;lt; selectedDate),
        Dataset1[Dataset1]
    )

#Dataset_2 = 
VAR selectedDate = SELECTEDVALUE(Calendar[Date])
RETURN 
    SUMX(
        FILTER(ALL(Dataset2), Dataset2[Date] &amp;gt;= selectedDate),
        Dataset2[Dataset2]
    )&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 24 Mar 2021 15:56:15 GMT</pubDate>
    <dc:creator>ERD</dc:creator>
    <dc:date>2021-03-24T15:56:15Z</dc:date>
    <item>
      <title>Show results before and after a chosen date (when referencing two date tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-results-before-and-after-a-chosen-date-when-referencing-two/m-p/1725655#M35719</link>
      <description>&lt;P&gt;Long-time prowler. First time posting. Here’s my dilemma:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two datasets, each organized by date. The data tables DO NOT have the same start/end date. I would like to choose a date (x in this example). Based on x, I want to sum() dataset 1 until the day prior to x. And sum() dataset 2 from x forward.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have found several solutions that get me close, but because the two datasets are different fact tables (with non-matching dates), I am stumped when it comes to developing a summary table/matrix that encompass both datasets.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Mar 2021 16:26:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-results-before-and-after-a-chosen-date-when-referencing-two/m-p/1725655#M35719</guid>
      <dc:creator>bdeluca</dc:creator>
      <dc:date>2021-03-18T16:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Show results before and after a chosen date (when referencing two date tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-results-before-and-after-a-chosen-date-when-referencing-two/m-p/1740872#M36176</link>
      <description>&lt;P&gt;Create a calendar table that can act as a dimension table to your two fact tables, and that can feed your slicer.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 00:38:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-results-before-and-after-a-chosen-date-when-referencing-two/m-p/1740872#M36176</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-03-24T00:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Show results before and after a chosen date (when referencing two date tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-results-before-and-after-a-chosen-date-when-referencing-two/m-p/1743118#M36224</link>
      <description>&lt;P&gt;I believe I tried what you are suggesting. I followed this tutorial:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=zYIxukD2KCM" target="_blank"&gt;https://www.youtube.com/watch?v=zYIxukD2KCM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue, though, is non-matching date tables. For context, I'm creating an Accounts Receivable report. It pulls in all past data until this date selected. Then - pulling from another fact table - pulls the remaining data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can accomplish this if I use two matrices and manually manipulate the date filter. However, my goal is to have this in one matrix with one slicer (and a date variable, I suppose) so that the report looks more orderly.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 15:38:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-results-before-and-after-a-chosen-date-when-referencing-two/m-p/1743118#M36224</guid>
      <dc:creator>bdeluca</dc:creator>
      <dc:date>2021-03-24T15:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Show results before and after a chosen date (when referencing two date tables)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-results-before-and-after-a-chosen-date-when-referencing-two/m-p/1743183#M36227</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="291038" data-lia-user-login="bdeluca" class="lia-mention lia-mention-user"&gt;bdeluca&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;From what I've got from your explanation is that you need 2 measures and a slicer.&lt;/P&gt;&lt;P&gt;Indeed, you need to create a dimention table to be used in your slicer that will contain all the dates from both tables. You can create it either in Power Query or DAX based on either provided start/end date or on min/max dates of youe existing fact tables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Measures that might be used:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#Dataset_1 = 
VAR selectedDate = SELECTEDVALUE(Calendar[Date])
RETURN 
    SUMX(
        FILTER(ALL(Dataset1), Dataset1[Date] &amp;lt; selectedDate),
        Dataset1[Dataset1]
    )

#Dataset_2 = 
VAR selectedDate = SELECTEDVALUE(Calendar[Date])
RETURN 
    SUMX(
        FILTER(ALL(Dataset2), Dataset2[Date] &amp;gt;= selectedDate),
        Dataset2[Dataset2]
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Mar 2021 15:56:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-results-before-and-after-a-chosen-date-when-referencing-two/m-p/1743183#M36227</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2021-03-24T15:56:15Z</dc:date>
    </item>
  </channel>
</rss>

