<?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 Issue with DAX Formula - Can't Figure it Out in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1171610#M18056</link>
    <description>&lt;P&gt;Hey Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having an issue getting the right answer from a DAX formula and hoping someone can help me out - been trying for days now (I have an example data file attached with the answer I'm hoping to get).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Esentially, I have a slicer that is the active date relationship between my date and data tables. I'm trying to create a simple SUM measure that sums up the data for the same time period last year using a &lt;STRONG&gt;different&lt;/STRONG&gt; date on my data table (an inactive date relationship). Up to this point I'm fine. Where I am running into issues is, I ALSO want to limit the results to rows where the active date relationship is within the slicer date ranges (minus the 1 year).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the measure I'm writing and coming up with BLANK. Attached is an example data file that may explain my issue in a better way and has the result I'm hoping to get.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help here would be GREATLY appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link to Example File:&amp;nbsp;&lt;A href="https://www.dropbox.com/s/plhogyjmkotbg7m/DAX%20Issue%20Example%20Data.pbix?dl=0" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/plhogyjmkotbg7m/DAX%20Issue%20Example%20Data.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TQO's Prior Year = 
CALCULATE([TQO's],
SAMEPERIODLASTYEAR('Date Table'[Date]), 
USERELATIONSHIP(Data[TQO Date],'Date Table'[Date]), 
FILTER(Data,(Data[AQL Date])&amp;gt;=(MIN('Date Table'[Date])-365))) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jun 2020 17:18:02 GMT</pubDate>
    <dc:creator>bknecht2</dc:creator>
    <dc:date>2020-06-19T17:18:02Z</dc:date>
    <item>
      <title>Issue with DAX Formula - Can't Figure it Out</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1171610#M18056</link>
      <description>&lt;P&gt;Hey Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having an issue getting the right answer from a DAX formula and hoping someone can help me out - been trying for days now (I have an example data file attached with the answer I'm hoping to get).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Esentially, I have a slicer that is the active date relationship between my date and data tables. I'm trying to create a simple SUM measure that sums up the data for the same time period last year using a &lt;STRONG&gt;different&lt;/STRONG&gt; date on my data table (an inactive date relationship). Up to this point I'm fine. Where I am running into issues is, I ALSO want to limit the results to rows where the active date relationship is within the slicer date ranges (minus the 1 year).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the measure I'm writing and coming up with BLANK. Attached is an example data file that may explain my issue in a better way and has the result I'm hoping to get.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help here would be GREATLY appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link to Example File:&amp;nbsp;&lt;A href="https://www.dropbox.com/s/plhogyjmkotbg7m/DAX%20Issue%20Example%20Data.pbix?dl=0" target="_blank" rel="noopener"&gt;https://www.dropbox.com/s/plhogyjmkotbg7m/DAX%20Issue%20Example%20Data.pbix?dl=0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TQO's Prior Year = 
CALCULATE([TQO's],
SAMEPERIODLASTYEAR('Date Table'[Date]), 
USERELATIONSHIP(Data[TQO Date],'Date Table'[Date]), 
FILTER(Data,(Data[AQL Date])&amp;gt;=(MIN('Date Table'[Date])-365))) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 17:18:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1171610#M18056</guid>
      <dc:creator>bknecht2</dc:creator>
      <dc:date>2020-06-19T17:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with DAX Formula - Can't Figure it Out</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1171646#M18057</link>
      <description>&lt;P&gt;You say you want it within the slicer range but then you use a different value for the MIN computation?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 17:57:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1171646#M18057</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-19T17:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with DAX Formula - Can't Figure it Out</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1171651#M18058</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do want it within the slicer range (the 'Date Table'[Date]), but minus 1 year, hence the -365 days of the minimum date selected on the slicer. So esentially, if the slicer date range on the example file is 1/1/2020 to 4/5/2020, I want this measure (TQO's Prior Year) to calculate the TQO's where the TQO date is between 1/1/2019 to 4/5/2019 and&amp;nbsp;&lt;STRONG&gt;ALSO WHERE &lt;/STRONG&gt;the AQL date is between 1/1/2019 and 4/5/2019. I can write the measure to work up until that last part, where the AQL date is also between 1/1/2019 and 4/5/2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measure that gets me there without that last part is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TQO Prior Year = 
CALCULATE([TQO's],
SAMEPERIODLASTYEAR('Date Table'[Date]),
USERELATIONSHIP('Campaign Member'[FCRM__FCR_SQR_Date__c],'Date Table'[Date]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that make sense?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 18:08:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1171651#M18058</guid>
      <dc:creator>bknecht2</dc:creator>
      <dc:date>2020-06-19T18:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with DAX Formula - Can't Figure it Out</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1171788#M18063</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TQO's Prior Year = 
var d=min('Date Table'[Date])
var e=EDATE(d,-12)
var c=CALCULATE([TQO's]
,SAMEPERIODLASTYEAR('Date Table'[Date])
,USERELATIONSHIP(Data[TQO Date],'Date Table'[Date])
,Data[AQL Date]&amp;gt;=e)
return c&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp; This give you the desired result but it ignores the MAX value of the date slider.&lt;/P&gt;&lt;P&gt;Note 2:&amp;nbsp; Your 365 made me chuckle. Replaced it with the much safer EDATE(-12)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 23:30:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1171788#M18063</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-19T23:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with DAX Formula - Can't Figure it Out</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1173588#M18199</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&amp;nbsp;- This works perfectly, thank you! I spent hours on this before - very much appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 13:51:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issue-with-DAX-Formula-Can-t-Figure-it-Out/m-p/1173588#M18199</guid>
      <dc:creator>bknecht2</dc:creator>
      <dc:date>2020-06-22T13:51:40Z</dc:date>
    </item>
  </channel>
</rss>

