Forum Discussion

jwin2424's avatar
jwin2424
Icon for Resolver I rankResolver I
4 years ago
Solved

Filter a calculation based on custom year

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 ...
  • tamerj1's avatar
    4 years ago

    Hi jwin2424 
    Please try

    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