Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Tengo un problema bastante fácil, pero no lo hago bien. Quiero calcular "Pronóstico"
Fecha | DateWvals | RunningTOtal | RunningPlannedTotal | Pronóstico |
1.1.2020 | 1.1.2020 | 2100 | 2200 | Blanco |
1.2.2020 | 1.2.2020 | 4000 | 4400 | Blanco |
1.3.2020 | Blanco | Blanco | 6600 | X |
1.4.2020 | Blanco | Blanco | 8800 | X2 |
Aquí, X debe ser igual a 6200.
X - RunningPlannedTotal + (RunningTotal-RunningPlannedTotal, en el último valor no en blanco de DateWvals)
X a 6600 + (4000-4400) a 6200. Y así el X2 produciría: 8800 + (4000-4400) a 8400.
Las vals de Pronóstico anteriores deben estar en blanco.
¡Por favor, ayúdenme!
puede probar debajo de la codificación DAX para crear una columna.
Column =
VAR lastdate1= MAXX(FILTER(Sheet1,'Sheet1'[Date]<EARLIER(Sheet1[Date])&&Sheet1[-RunningTOtal-]<>"blank"),'Sheet1'[Date].[Date])
VAR lasttotal=MAXX(FILTER(sheet1,Sheet1[Date]=lastdate1),Sheet1[-RunningTOtal-])
VAR lastplantotal=MAXX(FILTER(sheet1,Sheet1[Date]=lastdate1),Sheet1[-RunningPlannedTotal-])
return
if(lastdate1 =0,blank(),Sheet1[-RunningPlannedTotal-]+(lasttotal-lastplantotal))
Proud to be a Super User!
Gracias Ryan! Muy apreciado. Basé mi solución en la tuya.