<?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: Slowly changing dimensions current status vs history in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4689551#M179591</link>
    <description>&lt;P&gt;That worked! Thank you!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 May 2025 16:30:33 GMT</pubDate>
    <dc:creator>Janou</dc:creator>
    <dc:date>2025-05-12T16:30:33Z</dc:date>
    <item>
      <title>Slowly changing dimensions current status vs history</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4680688#M179281</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been struggling with a way to visualize data in the present and in the past while using slowly changing dimensions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;id&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;state&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;prio&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;start_date&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;end_date&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;123&lt;/TD&gt;&lt;TD&gt;open&lt;/TD&gt;&lt;TD&gt;low&lt;/TD&gt;&lt;TD&gt;4/1/2025&lt;/TD&gt;&lt;TD&gt;4/1/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;open&lt;/TD&gt;&lt;TD&gt;high&lt;/TD&gt;&lt;TD&gt;4/1/2025&lt;/TD&gt;&lt;TD&gt;4/1/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;456&lt;/TD&gt;&lt;TD&gt;closed&lt;/TD&gt;&lt;TD&gt;high&lt;/TD&gt;&lt;TD&gt;5/1/2025&lt;/TD&gt;&lt;TD&gt;5/1/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;789&lt;/TD&gt;&lt;TD&gt;open&lt;/TD&gt;&lt;TD&gt;medium&lt;/TD&gt;&lt;TD&gt;5/1/2025&lt;/TD&gt;&lt;TD&gt;5/1/2025&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next to this, I loaded an calendar table that is not connected to the table above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With below measure I am able to create a trendline to show the status per month, showing 2 open items in April and 1 open item in May.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE(COUNT(Table[ID]), FILTER(Table[start_date] &amp;lt;= max(calendar[date]) &amp;amp;&amp;amp; Table[end_date] &amp;gt;= min(calendar[date]) || Table[end_date] = blank()))&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CALCULATE(COUNT(Table[ID]), FILTER(Table[start_date] &amp;lt;= max(calendar[date]) &amp;amp;&amp;amp; Table[end_date] &amp;gt;= min(calendar[date]) || Table[end_date] = blank()))&lt;/LI-CODE&gt;&lt;P&gt;I am also able to get the current status (latest) by doing a simple count on the id and filter on end_date = latest.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to achieve is a measure that combines the two functionalities:&lt;/P&gt;&lt;P&gt;- Showing the current status by default&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Showing the previous status (e.g. April (2 open items)) when selecting that month in the trendline as described above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I set that up?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 16:06:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4680688#M179281</guid>
      <dc:creator>Janou</dc:creator>
      <dc:date>2025-05-05T16:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimensions current status vs history</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4680886#M179285</link>
      <description>&lt;P&gt;What you have is fact data, not an SCD2.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do you plan to "select that month in the trendline" ?&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 18:30:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4680886#M179285</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-05-05T18:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimensions current status vs history</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4683850#M179387</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1252569" target="_self"&gt;&lt;SPAN class=""&gt;Janou&lt;/SPAN&gt;&lt;/A&gt;,&lt;BR /&gt;&lt;BR /&gt;As per my undestanding, there are few things to consider:&lt;/P&gt;&lt;P&gt;1. SCD Type 2 should be implemented in the Fact Tables by using MERGE statements/ INSERT-UPDATE statements.&lt;BR /&gt;2. If you are not doing in the tables levels, then need to do it in the DAX. I feel bit tricking to do it.&lt;BR /&gt;&lt;BR /&gt;Please find the attached pbix file for your reference as per the sample data which you provided.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cloudbiexpert-my.sharepoint.com/:u:/p/maruthi/ER6kFNSmXItLpJrFtso0hlwBq0-rVCK9zaor6zJbPhQf-A?e=Eub8v6" target="_blank" rel="noopener"&gt;Slowly changing dimensions current status vs history.pbix&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;And if you found it useful, a quick "Kudos" is always appreciated — thanks!&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maruthi&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LinkedIn -&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://www.linkedin.com/in/maruthi-siva-prasad/" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;http://www.linkedin.com/in/maruthi-siva-prasad/&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;X&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://x.com/maruthisp" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Maruthi Siva Prasad - (@MaruthiSP) / X&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 03:07:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4683850#M179387</guid>
      <dc:creator>maruthisp</dc:creator>
      <dc:date>2025-05-08T03:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimensions current status vs history</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4689551#M179591</link>
      <description>&lt;P&gt;That worked! Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 16:30:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4689551#M179591</guid>
      <dc:creator>Janou</dc:creator>
      <dc:date>2025-05-12T16:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Slowly changing dimensions current status vs history</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4691550#M179647</link>
      <description>&lt;P&gt;I am glad to hear as it worked for you!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 00:54:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slowly-changing-dimensions-current-status-vs-history/m-p/4691550#M179647</guid>
      <dc:creator>maruthisp</dc:creator>
      <dc:date>2025-05-14T00:54:02Z</dc:date>
    </item>
  </channel>
</rss>

