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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.