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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
hegdecisco86
Helper I
Helper I

Suma acumulada mediante DAX

Hola a todos

Tengo mis datos como abajo.

IdOUTPUT_TYPEFORECASTED_MONTHFORECAST_QTYCumm. FORECAST_QTY
1Nominal32626
1Nominal62754
1Nominal92882
1Nominal1229111
1Nominal1860172
1Nominal2462234
1Nominal36127360
1Nominal48128488
1Nominal60127615
1UPPER_BOUND33226
1UPPER_BOUND63466
1UPPER_BOUND936102
1UPPER_BOUND1237139
1UPPER_BOUND1878217
1UPPER_BOUND2482299
1UPPER_BOUND36170469
1UPPER_BOUND48172641
1UPPER_BOUND60169810
1LOWER_BOUND32226
1LOWER_BOUND62244
1LOWER_BOUND92367
1LOWER_BOUND122390
1LOWER_BOUND1846136
1LOWER_BOUND2446182
1LOWER_BOUND3692274
1LOWER_BOUND4891365
1LOWER_BOUND6089454

Donde la última columna comm. ForeCast_Qty es suma acumulativa de cantidad de pronóstico. Quiero generar comm. Forecast_Qty usando la expresión DAX. Pero no viene como se esperaba.

He usado debajo de la fórmula

Cantidad Cummulativa Nueva ( Cummulative Qty)
CALCULATE(
SUM('Pronóstico'[FORECAST_QTY]),
FILTRO(
ALLEXCEPT('Previsión','Previsión'[ID],'Pronóstico'[OUTPUT_TYPE]),
MAX('Pronóstico'[FORECAST_MONTH]) > 'Pronóstico'[FORECAST_MONTH]
)
)
Pero la salida no viene como se esperaba y estoy consiguiendo por debajo de la salida.
IdFORECAST_MONTHOUTPUT_TYPEFORECAST_QTYCumm. FORECAST_QTY
13UPPER_BOUND321932.113659
16UPPER_BOUND343987.743786
19UPPER_BOUND366153.976373
112UPPER_BOUND378417.15069
118UPPER_BOUND7813180.17074
124UPPER_BOUND8218176.57163
136UPPER_BOUND17028551.03983
148UPPER_BOUND17239048.55704
160UPPER_BOUND16949351.2418
13Nominal261603.994892
16Nominal273279.197087
19Nominal285012.524375
112Nominal296793.830674
118Nominal6010468.45101
124Nominal6214250.6209
136Nominal12721989.71836
148Nominal12829789.28012
160Nominal12737507.12435
13LOWER_BOUND221328.185432
16LOWER_BOUND222688.436389
19LOWER_BOUND234067.609045
112LOWER_BOUND235458.004435
118LOWER_BOUND468256.060605
124LOWER_BOUND4611062.8622
136LOWER_BOUND9216664.66502
148LOWER_BOUND9122206.62438
160LOWER_BOUND8927649.1102

No entiendo dónde está el error. Por favor, ayúdame a resolver esto.

Gracias

Rajesh S Hegde

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@hegdecisco86 , Probar como

Cantidad Cummulativa Nueva ( Cummulative Qty)
CALCULATE(
SUM('Pronóstico'[FORECAST_QTY]),
FILTRO(
allselected('Forecasting'),'Forecasting'[ID],'Forecasting'[OUTPUT_TYPE] max('Forecasting'[OUTPUT_TYPE]) &&
'Previsión'[FORECAST_MONTH] <- MAX('Previsión'[FORECAST_MONTH])
)
)

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Carlos_Pando_0-1663093602734.pngeste es un grafico tipo matriz de power bi

Hola buenas tardes estoy en un dilema aca el %TO Voluntary me sale 9.05% el total pero cuando deseo mostrar en grafico me sale un valor menor 8.1. que debo de hacer para que cuando haga un grafico me salga el % total correcto .

Pongo la imagen del grafico que no concuerda con las cantidades totales.

Carlos_Pando_1-1663093699470.png

Favor su apoyo.

v-yangliu-msft
Community Support
Community Support

Hola @hegdecisco86 ,

Estos son los pasos que puede seguir:

1. Cree una columna calculcada.

Cumm. FORECAST_QTY =
CALCULATE(SUM('Table'[FORECAST_QTY]),FILTER('Table','Table'[Index]<=EARLIER('Table'[Index])&&'Table'[OUTPUT_TYPE]=EARLIER('Table'[OUTPUT_TYPE])))

2. Resultado.

v-yangliu-msft_0-1605834789471.jpeg

Puede descargar el archivo PBIX desde aquí.

Saludos

Liu Yang

Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

ryan_mayu
Super User
Super User

@hegdecisco86

que DAX debe funcionar bien.por favor vea el archivo adjunto.

1.PNG





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

Proud to be a Super User!




Gracias @ryan_mayu, está funcionando como se esperaba. Tenía columnas adicionales y por lo tanto no iba a venir. Ahora me he quitado y está funcionando bien

amitchandak
Super User
Super User

@hegdecisco86 , Probar como

Cantidad Cummulativa Nueva ( Cummulative Qty)
CALCULATE(
SUM('Pronóstico'[FORECAST_QTY]),
FILTRO(
allselected('Forecasting'),'Forecasting'[ID],'Forecasting'[OUTPUT_TYPE] max('Forecasting'[OUTPUT_TYPE]) &&
'Previsión'[FORECAST_MONTH] <- MAX('Previsión'[FORECAST_MONTH])
)
)

Gracias @amitchandak,está funcionando como se esperaba. Tenía columnas adicionales y por lo tanto no iba a venir. Ahora me he quitado y está funcionando bien

Hola @amitchandak ,
Lo he intentado como abajo. Pero no funciona como se esperaba.
Cantidad Cummulativa Nueva - CALCULATE(
SUM('Pronóstico'[FORECAST_QTY]),
FILTRO(
ALLSELECTED('Forecasting'),'Forecasting'[ID] ? SELECTEDVALUE('Forecasting'[ID]) &&
'Pronóstico'[OUTPUT_TYPE] á max('Previsión'[OUTPUT_TYPE]) &&
'Previsión'[FORECAST_MONTH] <- MAX('Previsión'[FORECAST_MONTH])
)
)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors