Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

current and previous year flag issues

Hi Team, I am trying to filter current year and previous year as i have created the calucalted column when i filter the flag as 1 it will filtering the only current year but not filtering the previous year. My requirement is when i filter the flag as 1 then it will filter 2022 and 2021, if i filter flag as 0 then remaining years should filter out. But my below formula filtering only current year not previous one so Can you please look below formula.

Current Year = IF (

YEAR ( Table1[Acquired Date].[Date] ) = YEAR ( TODAY ()-1 )&&YEAR(Table1[Acquired Year]=YEAR(TODAY())),

1,

0

)

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Tahreem24 both are giving same results it will not filter out the previous year and filtering the current year only. I need formula to filter current and previous year as well.

2 Replies

  • Anonymous , Tweak your formula like this:

    Current Year = IF (

    YEAR ( Table1[Acquired Date] ) = YEAR ( TODAY ()-1 )&&YEAR(Table1[Acquired Year]=YEAR(TODAY())),

    1,

    0

    )

    • Anonymous's avatar
      Anonymous
      Not applicable

      Tahreem24 both are giving same results it will not filter out the previous year and filtering the current year only. I need formula to filter current and previous year as well.