<?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: Filter a calculation based on custom year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-calculation-based-on-custom-year/m-p/2673704#M79822</link>
    <description>&lt;P&gt;This worked.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I see MAX used a lot when determining this. I was wondering if maybe you could elaborate on why it was needed?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again!&lt;/P&gt;</description>
    <pubDate>Mon, 01 Aug 2022 18:27:56 GMT</pubDate>
    <dc:creator>jwin2424</dc:creator>
    <dc:date>2022-08-01T18:27:56Z</dc:date>
    <item>
      <title>Filter a calculation based on custom year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-calculation-based-on-custom-year/m-p/2670123#M79586</link>
      <description>&lt;P&gt;I am trying to wrap my head around this, but I cannot get this right. I have custom dates, so time intellgence models don't work. Example, ONLY January 3rd - Jan 20th falls within January. Anytime I use time intellegence, it uses a calendar year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a calculation that results in a % value, and I simply want a formula that shows me the prior year's %. It seems like no matter HOW I filter, I keep getting the current year. Here is the last code I tried:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Conversion Rate YoY = 
VAR _LeadCount = Calculate(COUNT(Leads[Lead ID]), Leads[Qualification Group]="Partner Qualification", NOT(ISBLANK('Company Leads Report'[Status])))
VAR _WonCount = CALCULATE(COUNT('Leads'[Lead ID]),'Company Leads Report'[Status]="Closed - Won", Leads[Qualification Group]="Partner Qualification")
VAR _CurrentYR= DIVIDE(_WonCount, _LeadCount)

RETURN
    CALCULATE(
        _CurrentYR
        , 'Fiscal Calendar'[Year] = 'Fiscal Calendar'[Year] - 1
        )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what it returns:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have even tried other filter expressions, but it keeps giving me the current year. I don't know where I am going wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 19:02:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-calculation-based-on-custom-year/m-p/2670123#M79586</guid>
      <dc:creator>jwin2424</dc:creator>
      <dc:date>2022-07-29T19:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a calculation based on custom year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-calculation-based-on-custom-year/m-p/2670155#M79592</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="343802" data-lia-user-login="jwin2424" class="lia-mention lia-mention-user"&gt;jwin2424&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Conversion Rate YoY =
VAR _LeadCount =
    CALCULATE (
        COUNT ( Leads[Lead ID] ),
        Leads[Qualification Group] = "Partner Qualification",
        NOT ( ISBLANK ( 'Company Leads Report'[Status] ) ),
        'Fiscal Calendar'[Year]
            = MAX ( 'Fiscal Calendar'[Year] ) - 1
    )
VAR _WonCount =
    CALCULATE (
        COUNT ( 'Leads'[Lead ID] ),
        'Company Leads Report'[Status] = "Closed - Won",
        Leads[Qualification Group] = "Partner Qualification",
        'Fiscal Calendar'[Year]
            = MAX ( 'Fiscal Calendar'[Year] ) - 1
    )
VAR _CurrentYR =
    DIVIDE ( _WonCount, _LeadCount )
RETURN
    _CurrentYR&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 Jul 2022 19:32:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-calculation-based-on-custom-year/m-p/2670155#M79592</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-07-29T19:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a calculation based on custom year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-calculation-based-on-custom-year/m-p/2673704#M79822</link>
      <description>&lt;P&gt;This worked.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I see MAX used a lot when determining this. I was wondering if maybe you could elaborate on why it was needed?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 18:27:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-a-calculation-based-on-custom-year/m-p/2673704#M79822</guid>
      <dc:creator>jwin2424</dc:creator>
      <dc:date>2022-08-01T18:27:56Z</dc:date>
    </item>
  </channel>
</rss>

