<?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: Calculate date base on date row and create duplicates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-date-base-on-date-row-and-create-duplicates/m-p/3689744#M143377</link>
    <description>&lt;P&gt;Once you have that, what will be your next step?&amp;nbsp; Some sort of count of days per event?&lt;/P&gt;</description>
    <pubDate>Fri, 09 Feb 2024 02:21:22 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-02-09T02:21:22Z</dc:date>
    <item>
      <title>Calculate date base on date row and create duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-date-base-on-date-row-and-create-duplicates/m-p/3689545#M143363</link>
      <description>&lt;P&gt;Hi guys&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;I want to create duplicate row which show duration of a event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, "SetupsStart"=1/26&amp;nbsp; &amp;nbsp; "AgentsAll In" =1/30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create extra rows which cover the period which the result will come out as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SetupsStart&lt;/TD&gt;&lt;TD&gt;1/26/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SetupsStart&lt;/TD&gt;&lt;TD&gt;1/27/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SetupsStart&lt;/TD&gt;&lt;TD&gt;1/28/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SetupsStart&lt;/TD&gt;&lt;TD&gt;1/29/2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AgentsAll In&lt;/TD&gt;&lt;TD&gt;1/30/2024&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway to achieve this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advances!!!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 23:09:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-date-base-on-date-row-and-create-duplicates/m-p/3689545#M143363</guid>
      <dc:creator>njxfoster</dc:creator>
      <dc:date>2024-02-08T23:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate date base on date row and create duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-date-base-on-date-row-and-create-duplicates/m-p/3689744#M143377</link>
      <description>&lt;P&gt;Once you have that, what will be your next step?&amp;nbsp; Some sort of count of days per event?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 02:21:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-date-base-on-date-row-and-create-duplicates/m-p/3689744#M143377</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-02-09T02:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate date base on date row and create duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-date-base-on-date-row-and-create-duplicates/m-p/3690015#M143390</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="352970" data-lia-user-login="njxfoster" class="lia-mention lia-mention-user"&gt;njxfoster&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have provided a way to solve your problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's some dummy data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"Table"&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a new date table with the time range "01/26/2024" to "01/30/2024".&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;LI-CODE lang="markup"&gt;Date = CALENDAR("1/26/2024", "1/30/2024")&lt;/LI-CODE&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;Create a measure.&amp;nbsp;Determine the date range and fill in the value.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Event = 
var start_date = 
    CALCULATE(
        MAX('Table'[Date]), 
        FILTER(
            ALL('Table'), 
            'Table'[Event] = "SetupsStart"
        )
    )
var end_date = 
    CALCULATE(
        MIN('Table'[Date]), 
        FILTER(
            ALL('Table'), 
            'Table'[Event] = "AgentsALL In"
        )
    )
RETURN 
    IF(
        SELECTEDVALUE('Date'[Date]) &amp;gt;= start_date 
        &amp;amp;&amp;amp; 
        SELECTEDVALUE('Date'[Date]) &amp;lt;&amp;gt; end_date, 
        "SetupsStart", 
        "AgentsALL In"
    )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the result.&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;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 05:39:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-date-base-on-date-row-and-create-duplicates/m-p/3690015#M143390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-02-09T05:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate date base on date row and create duplicates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-date-base-on-date-row-and-create-duplicates/m-p/3744308#M146011</link>
      <description>&lt;P&gt;Hi Thank you for your reply! I need a solution that can cover all these event. The solution you provided only cover "SetupStart"and "AgentsAll in". Is there a solution that can cover all the other events (eg LeapStat, PrepStart etc) as well as other events that get added in the future?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 22:23:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-date-base-on-date-row-and-create-duplicates/m-p/3744308#M146011</guid>
      <dc:creator>njxfoster</dc:creator>
      <dc:date>2024-03-05T22:23:08Z</dc:date>
    </item>
  </channel>
</rss>

