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
Anonymous
Not applicable

Medida de suma de inventario acumulada

Hola a todos, he mirado alto y bajo en este foro, y no puedo encontrar una solución para esto. Estoy buscando crear una suma acumulada por cantidad de cantidades de inventario (el campo 'Cantidad' que se muestra a continuación) donde hay Inventario actual, Pedidos de ventas, Pedidos de producción, Pedidos de compra listados por artículo, fecha y sitio. Los valores de inventario siempre se muestran con la fecha actual, que construí en Power Query, pero estoy dispuesto a cambiar si hay una mejor solución. Aquí hay un ejemplo- ¿cómo puedo crear una medida que capture esto? Gracias de antemano!

IdArtículoFechaSitioTipoCantidad
Inventario10031629/10/2020GARD1Inventario12
301020966410031629/11/2020GARD1Pedido de ventas-3
301020869010031629/4/2020IVYL1Pedido de ventas-3
301020841410031629/4/2020IVYL1Pedido de ventas-10
301020886510031629/8/2020IVYL1Pedido de ventas-4
301020886510031629/8/2020IVYL1Pedido de ventas-1
301020881810031629/8/2020IVYL1Pedido de ventas-1
301020898710031629/9/2020IVYL1Pedido de ventas-2
301020754010031629/9/2020IVYL1Pedido de ventas-5
Inventario10031629/10/2020IVYL1Inventario994
301020921510031629/10/2020IVYL1Pedido de ventas-1
301020838610031629/10/2020IVYL1Pedido de ventas-14
301020939310031629/10/2020IVYL1Pedido de ventas-1
301020971610031629/11/2020IVYL1Pedido de ventas-1
301020994610031629/14/2020IVYL1Pedido de ventas-2
301020994410031629/14/2020IVYL1Pedido de ventas-4
301019945310031629/18/2020IVYL1Pedido de ventas-133
301020687710031629/28/2020IVYL1Pedido de ventas-1
301020687910031629/28/2020IVYL1Pedido de ventas-1
301020576710031629/28/2020IVYL1Pedido de ventas-1
301020576310031629/28/2020IVYL1Pedido de ventas-1
Inventario10031629/10/2020WARM1Inventario0
10001698410031629/28/2020WARM1Pedidos de producción1064
1 ACCEPTED SOLUTION

hola @garynorcross

Te falta TODO en tu fórmula, simplemente ajústalo como se muestra a continuación:

Cumm Sum =
CALCULATE (
    SUM ( Stock[Quantity] ),
    FILTER (
        ALL ( TableFiscalCalendar ),
        TableFiscalCalendar[GregorianDate] <= MAX ( TableFiscalCalendar[GregorianDate] )
    )
)

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@garynorcross , Crear una tabla de fechas y unirse a ella con su tabla y probar una medida como

Ventas de Cumm: CALCULATE(SUM(Table[Quantity]),filter(date,date[date] <-maxx(date,date[date]))

Para obtener lo mejor de la función de inteligencia del tiempo. Asegúrese de que tiene un calendario de fechas y que se ha marcado como la fecha en la vista de modelo. Además, únete a ella con la columna de fecha de tus hechos. recomienda:
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

Vea si mi seminario web sobre Time Intelligence puede ayudar: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...


Apreciamos tus Felicitaciones.

Anonymous
Not applicable

Hola @amitchandak, gracias por la respuesta, sin embargo esta medida no funciona. Tengo la tabla de fechas (TableFiscalCalendar) marcada como una tabla de fechas y hay una relación entre Table y TableFiscalCalendar usando los campos Table[Date] y TableFiscalCalendar[GregorianDate].

Suma de Cumm á CALCULATE(SUM(Stock[Quantity]),filter(TableFiscalCalendar,TableFiscalCalendar[GregorianDate] <-maxx(TableFisCalendar,TableFiscalCalendar[GregorianDate])))
¿Debe ajustarse?

hola @garynorcross

Te falta TODO en tu fórmula, simplemente ajústalo como se muestra a continuación:

Cumm Sum =
CALCULATE (
    SUM ( Stock[Quantity] ),
    FILTER (
        ALL ( TableFiscalCalendar ),
        TableFiscalCalendar[GregorianDate] <= MAX ( TableFiscalCalendar[GregorianDate] )
    )
)

saludos

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

@garynorcross: ¿puede usar la medida rápida total en ejecución integrada en Power BI Desktop?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler, la medida rápida total de ejecución no ha funcionado - He utilizado este criterio y el campo sólo trae el mismo valor para cantidad:

garynorcross_0-1599746859692.png

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.