<?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: Each record of date from start and end_date by Dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Each-record-of-date-from-start-and-end-date-by-Dax/m-p/3092557#M108389</link>
    <description>&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Thanks. It worked exactly as per my expectation&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2023 10:19:56 GMT</pubDate>
    <dc:creator>mmh</dc:creator>
    <dc:date>2023-02-22T10:19:56Z</dc:date>
    <item>
      <title>Each record of date from start and end_date by Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Each-record-of-date-from-start-and-end-date-by-Dax/m-p/3087773#M108029</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is a fact table with contract date as starDate and EndDate as&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Id&lt;/TD&gt;&lt;TD&gt;investment&lt;/TD&gt;&lt;TD&gt;ResidualValue&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;start_date&lt;/TD&gt;&lt;TD&gt;End_date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;1/1/2021&lt;/TD&gt;&lt;TD&gt;04/06/23&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;1/1/2022&lt;/TD&gt;&lt;TD&gt;1/1/2023&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need to calculated Exposure for every day inbetween (star and endate). For this measure i have created a custom colum for each record (in between start and end date), but problem the table become huge for each record n taking long time load. So is there any way create each record of date in Dax or measure exposure from date dimension. the calculation (exposure is )= remaining days of contract /total duration * (investment-residual value). Where total duratio is just subtraction of end_date and start_date and Remining days is contact is substraction of each_date (that would like create as calculate column or measures in Dax ) and start_date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;mmh&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 11:20:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Each-record-of-date-from-start-and-end-date-by-Dax/m-p/3087773#M108029</guid>
      <dc:creator>mmh</dc:creator>
      <dc:date>2023-02-20T11:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Each record of date from start and end_date by Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Each-record-of-date-from-start-and-end-date-by-Dax/m-p/3088172#M108062</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Exposure =
VAR MaxDate =
    MAX ( 'Date'[Date] )
VAR Exposure =
    CALCULATE (
        SUMX (
            'Table',
            VAR StartDate = 'Table'[start date]
            VAR EndDate = 'Table'[end date]
            VAR Investment = 'Table'[investment]
            VAR ResidualValue = 'Table'[residual value]
            VAR TotalDuration =
                INT ( EndDate - StartDate )
            VAR RemainingDays =
                INT ( EndDate - MaxDate )
            RETURN
                DIVIDE ( RemainingDays, TotalDuration ) * ( Investment - ResidualValue )
        ),
        'Table'[start date] &amp;lt;= MaxDate
            &amp;amp;&amp;amp; 'Table'[End date] &amp;gt;= MaxDate
    )
RETURN
    Exposure
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Feb 2023 14:25:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Each-record-of-date-from-start-and-end-date-by-Dax/m-p/3088172#M108062</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-02-20T14:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Each record of date from start and end_date by Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Each-record-of-date-from-start-and-end-date-by-Dax/m-p/3092557#M108389</link>
      <description>&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Thanks. It worked exactly as per my expectation&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 10:19:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Each-record-of-date-from-start-and-end-date-by-Dax/m-p/3092557#M108389</guid>
      <dc:creator>mmh</dc:creator>
      <dc:date>2023-02-22T10:19:56Z</dc:date>
    </item>
  </channel>
</rss>

