<?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: Relative Date using multiple dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2664286#M79110</link>
    <description>&lt;P&gt;I think that might just be Intellisense being rubbish. As you're iterating over 'TblTargets(2)' you have a row context so you can access any column from that table. Try just typing in the fully qualified name, i.e. 'TblTargets(2)'[Start date]&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 08:44:28 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2022-07-27T08:44:28Z</dc:date>
    <item>
      <title>Relative Date using multiple dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2627880#M76751</link>
      <description>&lt;P&gt;Hi there - just trying to see if this is possible or if anyone has done something similar.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that shows product sales and you can slice on those salespeople within in. However I want to only show sales after a certain date for a number of people, and that date is different in 3 ways...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. A group of people get sales from day 0 - they've worked for the company since that date and get credited for all sales&lt;/P&gt;&lt;P&gt;2. A group of people get sales from the day they started working for the company&lt;/P&gt;&lt;P&gt;3. A group of people get sales from one specified date in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible for that table to work to all of these rules when sliced by Salesperson?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 14:19:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2627880#M76751</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2022-07-08T14:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Date using multiple dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2627898#M76753</link>
      <description>&lt;P&gt;If you have a column on your sales person table which indicates the date from when they should receive credit for the sales, then you could create a measure like&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Filtered sales =
SUMX (
    'Sales person',
    CALCULATE (
        [Sales amount],
        KEEPFILTERS ( 'Date'[Date] &amp;gt;= 'Sales person'[Start date] )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 08 Jul 2022 14:28:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2627898#M76753</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-07-08T14:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Date using multiple dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2663005#M79028</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/240987"&gt;@johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for delayed response. Have given this a go but I'm not quite there...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TobP.png" style="width: 757px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/754569iAA1076DE2FC04B5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="TobP.png" alt="TobP.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my Saleserson Start Date in in TBlTargets (2) as is the saleperson name, code etc, the Sales Amount is in Nav_Sales, I have my Date table fine but when I look to bring in the Start Date from TblTargets (2), it will only allow me to select either the Date table or a Measure from another table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For info, I had to substitute Calculate [sales amount] from your suggestion above, as the Sales Amount isn't a measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 18:55:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2663005#M79028</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2022-07-26T18:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Date using multiple dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2663024#M79031</link>
      <description>&lt;P&gt;Realised that the Start Date wasn't marked as Date but that still doesn't make a difference.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 19:01:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2663024#M79031</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2022-07-26T19:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Date using multiple dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2664286#M79110</link>
      <description>&lt;P&gt;I think that might just be Intellisense being rubbish. As you're iterating over 'TblTargets(2)' you have a row context so you can access any column from that table. Try just typing in the fully qualified name, i.e. 'TblTargets(2)'[Start date]&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 08:44:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2664286#M79110</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-07-27T08:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Date using multiple dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2664684#M79135</link>
      <description>&lt;P&gt;Gave that another go typing it out from scratch but no use again. Have tried it an alternative way...&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TobP1.png" style="width: 831px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755089iBB90C8BDF311D898/image-size/large?v=v2&amp;amp;px=999" role="button" title="TobP1.png" alt="TobP1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So just for my sanity to make sure that I'm conveying myself properly. The Sales date that I need to filter on lives in TblTargets(2) (there are 2 dates, start date and product bonus start date, with the latter being the date that I want them to get bonus sales from).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nav_Sales History MASTER holds the £amount and also holds the Order Date. So if the Product Bonus Start Date is 01/11/22, then any sales with an order date &amp;gt;= 01/11/22 should be output. So when I amend your suggestion to make sure the order date is include (as I think it's necessary), then when I try to include the Product Bonus Start Date column which sits in 'TblTargets (2), I cannot do that. The only options are either measures or the Nav_Sales History MASTER Table. I have tried to use RELATED like below...but no luck either&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TobP2.png" style="width: 741px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/755092i2E64650813161E62/image-size/large?v=v2&amp;amp;px=999" role="button" title="TobP2.png" alt="TobP2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 11:03:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2664684#M79135</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2022-07-27T11:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Date using multiple dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2664699#M79137</link>
      <description>&lt;P&gt;Try storing the bonus start date in a variable&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Product target filtered sales =
SUMX (
    'TblTargets(2)',
    VAR bonusStartDate = 'TblTargets(2)'[Product bonus start date]
    RETURN
        CALCULATE (
            SUM ( 'Nav_Sales History MASTER'[Amount (LCY)] ),
            KEEPFILTERS ( 'Nav_Sales History MASTER'[Order date] &amp;gt;= bonusStartDate )
        )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 27 Jul 2022 11:09:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2664699#M79137</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-07-27T11:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Date using multiple dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2665004#M79159</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/240987"&gt;@johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great stuff! Works a treat. Thanks for helping out!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 12:48:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relative-Date-using-multiple-dates/m-p/2665004#M79159</guid>
      <dc:creator>Tob_P</dc:creator>
      <dc:date>2022-07-27T12:48:02Z</dc:date>
    </item>
  </channel>
</rss>

