cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Fecha de finalización prevista

Realmente estoy luchando para crear una columna de fecha de finalización objetivo. Me he acercado, pero todavía me he quedado corto. Solo se pueden completar 30 artículos por día y la fecha objetivo debe excluir los fines de semana y los días festivos federales. El siguiente código está creando una fecha objetivo. Sin embargo, no está teniendo en cuenta los elementos de las filas anteriores o excluyendo los fines de semana / días festivos.

Tengo dos ejemplos a continuación:

1) Tabla manual; El 6º solo tiene 10 artículos, lo que significa que 20 artículos del 7º se trabajarían hoy.

2) Power Bi Table: el 2º debería tener un objetivo de hoy. Sin embargo, el 5º y el 6º tendrían la misma fecha objetivo ya que el recuento total es <30.

1) Tabla manual:

maundrellp_1-1686662827363.png

2) Tabla de Power BI:

maundrellp_2-1686663087170.png

TargetCompletionTable =
DÓNDE Fechas =
VALORES('SLA pasado'[Fecha de recepción])
DÓNDE TargetTable =
ADDCOLUMNS (
Fechas,
"TotalItems",
CALCULAR (
SUMA('SLA pasado'[Recuento de categorías]),
TODOS excepto('SLA pasado', 'SLA pasado'[Fecha de recepción])
)
)
DÓNDE TargetTableWithCompletedToday =
ADDCOLUMNS (
TargetTable,
"CompletadoHoy",
SI([TotalItems] <= 30, [TotalItems], 30)
)
DÓNDE TargetTableWithRemainingItems =
ADDCOLUMNS (
TargetTableWithCompletedToday,
"Elementos restantes",
..MAX([TotalItems] - [CompletedToday], 0)
)
DÓNDE TargetTableWithDaysNeeded =
ADDCOLUMNS (
TargetTableWithRemainingItems,
"DíasNecesarios",
RANKX(Fechas, [Fecha de recepción], , ASC, Denso) - 1
)
DÓNDE Objetos acumuladosTabla =
ADDCOLUMNS (
TargetTableWithDaysNeeded,
"Elementos acumulados",
CALCULAR (
SUMA('SLA pasado'[Recuento de categorías]),
FILTRO (
TODO('SLA pasado'[Fecha de recepción]),
'SLA pasado'[Fecha de recepción] <= ANTERIOR('SLA pasado'[Fecha de recepción])
)
)
)
DEVOLUCIÓN
SELECTCOLUMNS (
TargetTableWithDaysNeeded,
"Fecha de recepción", [Fecha de recepción],
"Recuento de categorías", [TotalItems],
"Elementos restantes", [Elementos restantes],
"Fecha de finalización prevista",
SI (
MAXX(FILTRO(Objetos acumuladosTabla, [Fecha de recepción] <= ANTERIOR([Fecha de recepción])), [Elementos acumulados]) > 30,
HOY() + [DíasNecesarios] + 1,
HOY() + [DíasNecesarios]
)
)
1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Hola @maundrellp Intente depurarlo creando tabla por VAR y rastree "error".

ADDCOLUMNS no respeta el linaje de datos, por lo que podría ser motivo de resultados no deseados.

Espero que esto ayude

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors