Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Use a year filter, to filter records with a START and an END date.

Hello community,

I need to put in a report a year filter, to bring me records that their start and end date, are within that year.

example:

idstartfinish
23402/10/201815/12/2019
234514/06/201918/11/2021
5364403/10/201931/06/2019
54234214/08/202002/03/2023
2343211/07/202117/02/2023

And in the report I have my selector:

  • 2018
  • 2019
  • 2020
  • 2021
  • 2022
  • 2023

If my selection is: 2021

Seberia bring me :

234514/06/201918/11/2021
54234214/08/202002/03/2023
2343211/07/202117/02/2023

Can you do something with a filter?

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

I was able to solve it as follows.

I created a new table to have the years with which I would cross the report using filter.

StartDate = CALENDAR(MIN(Projects[Start]),MAX(Projects[Start]))

Then I created 1 column in my table where the data I need to filter are, to mark with a 1 those that are within that year, and with a 0 those that are not.

Flag = 
var _min=SELECTEDVALUE(StartDate[Inicio].[ Year])

return
 IF(AND(SUM(Projects[FechaInicio].[ Year]) <= _min , SUM(Projects[FechaFin].[ Year]) >= _min), 1 ,0)

Then in the report filter the Flag 1

HectorSII_0-1677762943670.png

And so was the report

HectorSII_1-1677763107768.png

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

I was able to solve it as follows.

I created a new table to have the years with which I would cross the report using filter.

StartDate = CALENDAR(MIN(Projects[Start]),MAX(Projects[Start]))

Then I created 1 column in my table where the data I need to filter are, to mark with a 1 those that are within that year, and with a 0 those that are not.

Flag = 
var _min=SELECTEDVALUE(StartDate[Inicio].[ Year])

return
 IF(AND(SUM(Projects[FechaInicio].[ Year]) <= _min , SUM(Projects[FechaFin].[ Year]) >= _min), 1 ,0)

Then in the report filter the Flag 1

HectorSII_0-1677762943670.png

And so was the report

HectorSII_1-1677763107768.png

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors