Forum Discussion

Stuznet's avatar
Stuznet
Icon for Helper V rankHelper V
8 years ago
Solved

Filter Year Dynamically without Slicer

Hi guys,   I'm having problem filtering the year dynamically without using my slicer.  I'm summing the total of IDs for this year. I could add the year in the page filter but I don't want to...
  • Greg_Deckler's avatar
    8 years ago

    Many times, this is handled in the data or a measure via something along the lines of (column form):

     

    Column = IF(YEAR(TODAY())=YEAR([Date]),1,0)

    Then you just filter on 1

  • Stuznet's avatar
    Stuznet
    8 years ago

    Greg_DecklerThank you :) I was able to get the correct count.

     

    This is what I did

    1) Create new column

     

    Column = IF(YEAR(TODAY()) = YEAR([columnDate]),1,0)

     

    2) Create new measure

     

    Measure = CALCULATE(SUM(Table1[measure]),FILTER(Table1,Table1[Column]))