<?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: Date Range calculation problems if the user select years Not consecutive in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Range-calculation-problems-if-the-user-select-years-Not/m-p/1273588#M21503</link>
    <description>Still the problem didn't solved.</description>
    <pubDate>Wed, 05 Aug 2020 07:35:18 GMT</pubDate>
    <dc:creator>MAAbdullah_47</dc:creator>
    <dc:date>2020-08-05T07:35:18Z</dc:date>
    <item>
      <title>Date Range calculation problems if the user select years Not consecutive</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Range-calculation-problems-if-the-user-select-years-Not/m-p/1260993#M20983</link>
      <description>&lt;H4&gt;I have 2 Problems related to date Range:&lt;BR /&gt;&lt;STRONG&gt;Problem-1&lt;/STRONG&gt;&lt;BR /&gt;I have measure (CLTV) that calculatetes customer life time value (CLTV) &lt;A href="https://blog.hubspot.com/service/how-to-calculate-customer-lifetime-value" target="_blank"&gt;https://blog.hubspot.com/service/how-to-calculate-customer-lifetime-value&lt;/A&gt;&lt;BR /&gt;There is no problem in calculating the formula, but the challenge (CLTV) depends totally when selecting **(Two consecutive years)** otherwise it will not calculate correctly, My Question how to deal if the User select (2) Years that are Not consecutive from the Years Slicer By alerting the customer to correct his selection or to do condition in the formula to make the calculation(CLTV) only if the years&lt;BR /&gt;are consecutive?&lt;/H4&gt;&lt;H4&gt;&lt;STRONG&gt;Problem-2&lt;/STRONG&gt;&lt;BR /&gt;I made a complete process to calculate customer customer segmentation through (RFM) &lt;A href="https://en.wikipedia.org/wiki/RFM_(market_research" target="_blank"&gt;https://en.wikipedia.org/wiki/RFM_(market_research&lt;/A&gt;)&lt;/H4&gt;&lt;H4&gt;For calculating the recency of the customer I have 1 measure(cstRecency) and 1 calculated column(Cust Recency) that do the same thing as it showed below:&lt;BR /&gt;&lt;BR /&gt;Cust Recency = DATEDIFF([cstLastTrnDate], DATEVALUE("2018/11/16"), DAY)--&amp;gt;2018/11/16 (Last transaction date in sales oreder data)&lt;BR /&gt;cstLastTrnDate = CALCULATE(MAX(Sales[OrderDate]))&lt;BR /&gt;The transaction sales date range is from (1/1/2014) Up To (16/11/2018)&lt;BR /&gt;My Problem is in filtering the (recency) parameter range (1 to X) and/or selecting the year from slicer&lt;BR /&gt;for example :&lt;BR /&gt;-If I select the range from (1 to 365) it should filter the Customers segments whom recent visits in 2014 Only and , If I select (366-730) It should gives the customers whom visits (2014 and 2015) and so on.&lt;BR /&gt;How to reflect the (RFM) score dynamically based on the filter of the (recency)?&lt;/H4&gt;&lt;H4&gt;Note: I attached the (pbix) file, It is in Arabic But all the mentioned fields and formulas I make it in English in the Report Name (RFM).&lt;A title="The Pbix File" href="https://drive.google.com/file/d/1251v--r1h8B2Uglnv8jlxd1erDqHvhNm/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1251v--r1h8B2Uglnv8jlxd1erDqHvhNm/view?usp=sharing&lt;/A&gt;&amp;nbsp;&lt;/H4&gt;</description>
      <pubDate>Thu, 30 Jul 2020 07:02:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Range-calculation-problems-if-the-user-select-years-Not/m-p/1260993#M20983</guid>
      <dc:creator>MAAbdullah_47</dc:creator>
      <dc:date>2020-07-30T07:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range calculation problems if the user select years Not consecutive</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Range-calculation-problems-if-the-user-select-years-Not/m-p/1261328#M20995</link>
      <description>For problem 1 can you just have them select start year and then do calculation based on the selected year and previous year?&lt;BR /&gt;&lt;BR /&gt;What result do you want the measure to give if more than 2 consecutive years are selected?</description>
      <pubDate>Thu, 30 Jul 2020 08:39:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Range-calculation-problems-if-the-user-select-years-Not/m-p/1261328#M20995</guid>
      <dc:creator>AllisonKennedy</dc:creator>
      <dc:date>2020-07-30T08:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range calculation problems if the user select years Not consecutive</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Range-calculation-problems-if-the-user-select-years-Not/m-p/1261549#M21008</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="227497" data-lia-user-login="AllisonKennedy" class="lia-mention lia-mention-user"&gt;AllisonKennedy&lt;/a&gt;&amp;nbsp; Sorry I ddnt understand your point can you explain,&lt;BR /&gt;If I Understand Your Question The CLTV start calculating from after the first year, in our example after the year 2014, so if the user select 2014 the result will be 0 , After that the User should select single or more than one year but should be&amp;nbsp;consecutive (&lt;SPAN&gt;successive) e.g. 2015,2017,2018 , If the user select 2015,2017 it will calculate but it will not reflect the real correct case.&lt;BR /&gt;&lt;/SPAN&gt;You can look at the measure (CLTV) in the pbix file.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 09:44:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Range-calculation-problems-if-the-user-select-years-Not/m-p/1261549#M21008</guid>
      <dc:creator>MAAbdullah_47</dc:creator>
      <dc:date>2020-07-30T09:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date Range calculation problems if the user select years Not consecutive</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Range-calculation-problems-if-the-user-select-years-Not/m-p/1273588#M21503</link>
      <description>Still the problem didn't solved.</description>
      <pubDate>Wed, 05 Aug 2020 07:35:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-Range-calculation-problems-if-the-user-select-years-Not/m-p/1273588#M21503</guid>
      <dc:creator>MAAbdullah_47</dc:creator>
      <dc:date>2020-08-05T07:35:18Z</dc:date>
    </item>
  </channel>
</rss>

