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.
Estoy intentando crear una "Nueva Tabla" a partir de un conjunto de datos existente que realiza un Total acumulado de balanceo por año, mes, cliente, etc.
Código actual
Cumulative Sales = SUMMARIZE(VW_FIN_SALES_INVOICES
,VW_ROSSDW_DIM_DATE[fin_year]
,VW_ROSSDW_DIM_DATE[fin_month_no]
,CUSTOMER_ADDRESSES[DIVISION]
,CUSTOMER_ADDRESSES[CUSTOMER_NUMBER]
,VW_FIN_SALES_INVOICES[CF_SHIP_TO_ID]
,PRODUCT_MASTER[PRODUCT_GROUP]
,PRODUCT_MASTER[Product Groups]
,PRODUCT_MASTER[Product Class]
,PRODUCT_MASTER[Full Part Description]
,"Sales",CALCULATE(sum(VW_FIN_SALES_INVOICES[SOP_INVOICE_TOTAL_BASE]),
ALL(VW_ROSSDW_DIM_DATE),VW_ROSSDW_DIM_DATE[fin_month_no]<=EARLIER(VW_ROSSDW_DIM_DATE[fin_month_no]))
)
Ejemplo de resultado final
fin_year | fin_month_no | División | CUSTOMER_NUMBER | Descripción completa de la pieza | Ventas |
2020 | 1 | 00 | 1196 | Producto 1 | 500 |
2020 | 2 | 00 | 1196 | Producto 1 | 500 |
2020 | 2 | 00 | 1196 | Producto 2 | 1000 |
2020 | 3 | 00 | 1196 | Producto 1 | 500 |
2020 | 3 | 00 | 1196 | Producto 2 | 1000 |
Solved! Go to Solution.
Tengo los datos que necesito, no creo que sea la mejor manera de hacerlo.
Resumió mis datos de hechos y usó mi tabla de fechas Dim para repetir los meses y el año.
Test = ADDCOLUMNS(SUMMARIZECOLUMNS(
VW_ROSSDW_DIM_DATE[fin_year]
,VW_ROSSDW_DIM_DATE[fin_month_no]
,VW_FIN_SALES_INVOICES[Division]
,VW_FIN_SALES_INVOICES[Customer,Number]
,VW_FIN_SALES_INVOICES[CF_SHIP_TO_ID]
,VW_FIN_SALES_INVOICES[Product,Group]
,VW_FIN_SALES_INVOICES[Product]
),"Sales",[Gross Sales]
)
Luego hice un total rodante
Cumulative Totals =
CALCULATE (
SUM (Test[Sales] ),
FILTER (
'test',
'test'[Product] = EARLIER ( 'test'[Product] )
&& 'Test'[fin_year] = EARLIER ( 'Test'[fin_year] )
&& 'Test'[CF_SHIP_TO_ID] = EARLIER ( 'Test'[CF_SHIP_TO_ID] )
&& 'Test'[fin_month_no] <= EARLIER ( Test[fin_month_no] )
)
)
Tengo los datos que necesito, no creo que sea la mejor manera de hacerlo.
Resumió mis datos de hechos y usó mi tabla de fechas Dim para repetir los meses y el año.
Test = ADDCOLUMNS(SUMMARIZECOLUMNS(
VW_ROSSDW_DIM_DATE[fin_year]
,VW_ROSSDW_DIM_DATE[fin_month_no]
,VW_FIN_SALES_INVOICES[Division]
,VW_FIN_SALES_INVOICES[Customer,Number]
,VW_FIN_SALES_INVOICES[CF_SHIP_TO_ID]
,VW_FIN_SALES_INVOICES[Product,Group]
,VW_FIN_SALES_INVOICES[Product]
),"Sales",[Gross Sales]
)
Luego hice un total rodante
Cumulative Totals =
CALCULATE (
SUM (Test[Sales] ),
FILTER (
'test',
'test'[Product] = EARLIER ( 'test'[Product] )
&& 'Test'[fin_year] = EARLIER ( 'Test'[fin_year] )
&& 'Test'[CF_SHIP_TO_ID] = EARLIER ( 'Test'[CF_SHIP_TO_ID] )
&& 'Test'[fin_month_no] <= EARLIER ( Test[fin_month_no] )
)
)
Hola , @Tuan
¿Podría decirme si su problema ha sido resuelto?
Si es así, marque su respuesta como Respuesta para cerrar este hilo.
Saludos
Equipo de Apoyo Comunitario _ Eason
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |