Forum Discussion

jwin2424's avatar
jwin2424
Resolver I
1 year ago
Solved

Formula stops working when year filter is added

I am perplexed as to why this is happening. When I use the formula without adding a year filter, it works perfectly. When I filter to a year or specific years, it breaks. I don't understand what I am...
  • jwin2424's avatar
    jwin2424
    1 year ago

    Unfortunately, that doesn't work for me. It removes all filters and then won't apply page-level filters. This is the result


    I did try a different varation of the formula. I used LOOKUPVALUE to retrieve the "created on" year. Since our fiscal calendar starts on Jan 1st and ends of Dec 31st, using the year can work by just using the actual calendar year and not the LOOKUPVALUE. For some reason, this formula worked. 

    Leads (PY) =
    VAR _PY =
    MAX(Leads[Created On].[Year])-1

    RETURN
    CALCULATE(
        [Lead Count],
        Leads[Created On].[Year] = _PY
    )



    I am not sure why my lookupvalue year doesn't work.