cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnnyboy_175
Frequent Visitor

Pronóstico acumulativo - Datos del gráfico de curva S

He seguido el tutorial de Sam

https://blog.enterprisedna.co/how-to-calculate-a-cumulative-run-rate-in-power-bi-using-dax/

Idealmente necesito un filtro o una instrucción IF donde si real ISNOTBLANK entonces el valor de pronóstico debe ser igual a 0, manteniendo la suma acumulada. Essentiall crear un gráfico de datos de S-Curve (he colocado el AvgRate y mi medida acumulativa por debajo de la medida de previsión)

Esencialmente lo que quiero hacer en power bi es vincular la línea real y la línea de previsión juntos, cambiando la tabla 1 a la tabla 2(ver tablas abajo).

También tengo otra consulta que es no agregar el 'avg daily real' a la 'previsión acumulativa' SI otra columna, que es 'Target (valor codificado duro)' es igual a cero, cambiando la tabla 2 a la tabla 3.

Pronóstico: **bleep** Pronóstico ?

Var AvgRate á [Tasa media]

devolución

CALCULATE(

SUMX(SUMMARIZE(DateTime_Table, DateTime_Table[Date], "Rate", AvgRate), [Rate]),

FILTER(ALLSELECTED(DateTime_Table), DateTime_Table[Fecha]<-MAX(DateTime_Table[Fecha]))-AvgRate

Pronóstico: **bleep** Total Real - CALCULATE([Real],DATESMTD(DateTime_Table[Fecha]),

FILTRO (

ALL('Production_Data'[Fecha y hora]),

'Production_Data'[Fecha y hora] <- MAX ( 'Production_Data'[Fecha y hora])

))

Pronóstico: Promedio diario actual ?

VAR DaysWithActual ? CALCULATE(DISTINCTCOUNT(DateTime_Table[Date]), FILTER(ALLSELECTED(DateTime_Table),[Actual]>0))

VAR CumulativeTotal á CALCULATE([Previsión: **bleep** Total Real], ALLSELECTED(DateTime_Table[Date]))

devolución

DIVIDE(CumulativeTotal,DaysWithActual,0)

Gracias

TABLA 1
FechaDaily ActualActual (cumulitive)Tasa de ejecuciónPronósticoDestino (valor codificado duro)Objetivo (cumulitivo)
12/10/2020 0:00 900 7,425 627 6,897 888 10,688
13/10/2020 0:00 100 7,525 627 7,524 888 11,576
14/10/2020 0:00 627 8,151 888 12,464
15/10/2020 0:00 627 8,778 - 12,464
TABLA 2
12/10/2020 0:00 900 7,425 627 888 10,688
13/10/2020 0:00 100 7,525 627 888 11,576
14/10/2020 0:00 627 8,151 888 12,464
15/10/2020 0:00 627 8,778 - 12,464
TABLA 3
12/10/2020 0:00 900 7,425 627 888 10,688
13/10/2020 0:00 100 7,525 627 888 11,576
14/10/2020 0:00 627 8,151 888 12,464
15/10/2020 0:00 627 8,151 - 12,464
16/10/2020 0:00 627 8,151 - 12,464
17/10/2020 0:00 627 8,151 - 12,464
18/10/2020 0:00 627 8,151 - 12,464
19/10/2020 0:00 627 8,151 - 12,464
20/10/2020 0:00 627 8,151 - 12,464
21/10/2020 0:00 627 8,151 - 12,464
22/10/2020 0:00 627 8,778 888 13,352

2 REPLIES 2
johnnyboy_175
Frequent Visitor

Forecast.PNG

Hola Rena, he compilado las medidas, mi problema es que quiero que la medida de previsión esté condicionada al objetivo (específicamente si el objetivo (columna gris) es 0 para el día, no agregue la tasa de ejecución (azul) a la previsión (naranja), similar a distinctcount).

Otro problema es que no comienza en el día 1, ver celda resaltada en amarillo. Tengo c&ped mis medidas en la parte inferior para su ref. cualquier ayuda apreciada.

La imagen es una exportación de datos de mis medidas actuales de power bi.

Real: CALCULATE(SUM('Actuals'[Reals A)+SUM(Reals B]))

Cumulitive Real - CALCULATE([Actual],DATESMTD(DateTime_Table[Fecha]),

FILTRO (

ALL('Production_Data'[Fecha y hora]),

'Production_Data'[Fecha y hora] <- MAX ( 'Production_Data'[Fecha y hora])

))

Promedio diario ?

VAR DaysWithActual ? CALCULATE(DISTINCTCOUNT(DateTime_Table[Date]), FILTER(ALLSELECTED(DateTime_Table),[Actual)]>0))

VAR CumulativeTotal á CALCULATE([Cumulitive Actual], ALLSELECTED(DateTime_Table[Date]))

devolución

DIVIDE(CumulativeTotal,DaysWithActual,0)

Objetivo diario: SUM(Production_Targets[Objetivo concentrado total (t/shift)])

Pronóstico de Cumulititve ?

VAR AvgRate á [Velocidad de ejecución]

devolución

CALCULATE(

SUMX(SUMMARIZE(DateTime_Table, DateTime_Table[Date], "RunRate", AvgRate), [RunRate]),

FILTER(ALLSELECTED(DateTime_Table), DateTime_Table[Fecha]<-MAX(DateTime_Table[Fecha]))-AvgRate

v-yiruan-msft
Community Support
Community Support

Hola @johnnyboy_175 ,

¿Podría ayudar a comprobar si la siguiente comprensión es correcta o no?

1. Desea obtener dos campos: [Pronóstico] y [Objetivo (cumulitivo)]?

2. La lógica de cálculo de estos campos como se indica a continuación:

Forecast= if ( the value of field [Daily Actual] is not blank, blank(),[Forecast]+[Run rate])
[Target (cumulitive)]=if( [Target (hard coded value)]is blank, not culmulative, cumulitive+Target (hard coded value))

3. El primer valor de [Forecast] 6897 y [[Target (cumulitive)] 10688 es default value or the value from the calculation?

Si mi comprensión es correcta, aquí hay algunos hilos similares, puede referirlos para obtenerlo.

Suma acumulada por fecha por condición

Suma acumulada con condición

Saludos

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

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!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors