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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vehau1
Helper I
Helper I

Problema de Colums personalizados: pronóstico

Tengo un problema bastante fácil, pero no lo hago bien. Quiero calcular "Pronóstico"

FechaDateWvalsRunningTOtalRunningPlannedTotalPronóstico
1.1.20201.1.202021002200Blanco
1.2.20201.2.202040004400Blanco
1.3.2020BlancoBlanco6600X
1.4.2020BlancoBlanco8800X2

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!

2 REPLIES 2
ryan_mayu
Super User
Super User

@vehau1

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))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Gracias Ryan! Muy apreciado. Basé mi solución en la tuya.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.