Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
In Power BI, I have a table that counts the number of projects that need to be completed by their due date. However, there is a need for projects that are not completed within the specified month to automatically move to the next month. For example, a project scheduled for January, if not completed by the due date, should automatically move to February, and so on, until I update it in my data source.
Exemple
If the date is September 09/24 and it has to go to October 10/24, however if any date appears October 10/24 it will go to November 11/2024 but the date of October 10/24 that came from September 09/24 will remain in October 10/24 and it will only go to the next month, case 11, if the current month it is in ends and does not update the new date in the database, and this behavior must always be repeated.
I've tried this way below
Created this Calculated Column
And this measure below
But, it's not working properly, it's all in November, in my case it would have to have some in October too, does anyone have any adjustment ideas?
DataAjustada =
VAR DataInicial = f_Projetos[Termino]
VAR MesAtual = MONTH(TODAY())
VAR AnoAtual = YEAR(TODAY())
RETURN
IF (
f_Projetos[Status] <> "Completo" && f_Projetos[Status] <> "Despriorizado",
-- If the project is overdue, keep adjusting the date
IF (
DataInicial < TODAY(),
EDATE(DataInicial, DATEDIFF(DataInicial, TODAY(), MONTH)),
DataInicial
),
DataInicial -- If project is complete or deprioritized, don't adjust
)
ProjetosAtrasadosPorMes =
CALCULATE(
COUNTROWS(
FILTER(
f_Projetos,
f_Projetos[DataAjustada] <= TODAY() &&
f_Projetos[Status] <> "Completo" &&
f_Projetos[Status] <> "Despriorizado"
)
),
USERELATIONSHIP(d_Calendario[Date], f_Projetos[DataAjustada])
)
Ensure that you have a proper relationship between your project table (f_Projetos) and the date/calendar table (d_Calendario). Use USERELATIONSHIP in the measure to make sure the DataAjustada column drives the relationship for the project dates rather than the original due date.
If this helped, a Kudos 👍 or Solution mark would be great!🎉
Cheers,
Kedar Pande
Connect on LinkedIn
Hi,
This part looks like it worked well,
DataAjustada =
VAR DataInicial = f_Projetos[Termino]
VAR MesAtual = MONTH(TODAY())
VAR AnoAtual = YEAR(TODAY())
RETURN
IF (
f_Projetos[Status] <> "Completo" && f_Projetos[Status] <> "Despriorizado",
-- If the project is overdue, keep adjusting the date
IF (
DataInicial < TODAY(),
EDATE(DataInicial, DATEDIFF(DataInicial, TODAY(), MONTH)),
DataInicial
),
DataInicial -- If project is complete or deprioritized, don't adjust
)
But this one below it seems not,
ProjetosAtrasadosPorMes =
CALCULATE(
COUNTROWS(
FILTER(
f_Projetos,
f_Projetos[DataAjustada] <= TODAY() &&
f_Projetos[Status] <> "Completo" &&
f_Projetos[Status] <> "Despriorizado"
)
),
USERELATIONSHIP(d_Calendario[Date], f_Projetos[DataAjustada])
)
with this code it's show me just one project delayed in October, I must see 6 projects delayed in October and 1 in November, and so on.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 9 | |
| 8 |