This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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:
| id | start | finish |
| 234 | 02/10/2018 | 15/12/2019 |
| 2345 | 14/06/2019 | 18/11/2021 |
| 53644 | 03/10/2019 | 31/06/2019 |
| 542342 | 14/08/2020 | 02/03/2023 |
| 23432 | 11/07/2021 | 17/02/2023 |
And in the report I have my selector:
If my selection is: 2021
Seberia bring me :
| 2345 | 14/06/2019 | 18/11/2021 |
| 542342 | 14/08/2020 | 02/03/2023 |
| 23432 | 11/07/2021 | 17/02/2023 |
Can you do something with a filter?
Solved! Go to Solution.
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
And so was the report
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
And so was the report
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 26 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 37 | |
| 32 | |
| 25 | |
| 23 |