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
Syndicate_Admin
Administrator
Administrator

Oferta vs demanda

A continuación se muestran los mismos datos pleple y buscando la demanda (Recuento de valores en la columna de fecha de demanda) y Oferta (Recuento de valores en la columna de fecha de suministro), Mirando una vista para comparar ambos recuentos como 1-1 contra el mes fijo de enero a diciembre en el eje X.

NÚMERO DE IDENTIFICACIÓNNúmero de piezaCLIENTEFECHA DE DEMANDAFECHA DE SUMINISTRO
11Vinod 17/08/202212/01/2023
21Vinod 17/08/202204/05/2023
31Vinod 17/08/202227/01/2023
41Vinod 17/08/202205/04/2023
52Vinod 01/02/202220/01/2023
62Vinod 01/02/202220/01/2023
72Vinod 01/02/202220/01/2023
82Vinod 01/02/202220/01/2023
92Vinod 01/02/202210/03/2023
102Vinod 01/02/202228/02/2023
112Vinod 01/02/202210/03/2023
122Vinod 01/02/202205/04/2023
132Vinod 27/04/202220/01/2023
141Vinod 21/10/202205/04/2023
151Vinod 21/10/202205/04/2023
161Vinod 21/10/202217/04/2023
171Vinod 21/10/202204/05/2023
181Vinod 21/10/202217/04/2023

Resultado esperado

Vinod_P_0-1685626479550.png

El stock de cierre del mes anterior debe agregarse al actual

LOB = Mes actual (oferta-demanda) + Mes anterior (LOB)

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hola Amit,

Gracias por la rápida respuesta.

Logré obtener formauls de oferta y demanda

Suministro = si(CALCULAR(CONTAR(Rastreador[ID SEQ]), FILTRO(Rastreador,Rastreador[EST. ENTREGA DEL PRONÓSTICO]<=EOMES(..max('Fecha'[Fecha]),0) && Rastreador[EST. ENTREGA DEL PRONÓSTICO]>EOMES(..max('Fecha'[Fecha]),-1)))=ESPACIO EN BLANCO(),0,CALCULAR(CONTAR(Rastreador[ID SEQ]), FILTRO(Rastreador,Rastreador[EST. ENTREGA DEL PRONÓSTICO]<=EOMES(..max('Fecha'[Fecha]),0) && Rastreador[EST. ENTREGA DEL PRONÓSTICO]>EOMES(..max('Fecha'[Fecha]),-1))))
y
Demanda = si(CALCULAR(CONTAR(Rastreador[SEQ ID]), FILTRO(Tracker,Tracker[CUST REQ DATE]<=EOMES(..max('Fecha' [Fecha]),0) && Tracker[CUST REQ DATE]>EOMES(..max('Fecha' [Fecha]),-1)))=ESPACIO EN BLANCO(),0,CALCULAR(CONTAR(Rastreador[SEQ ID]), FILTRO(Tracker,Tracker[CUST REQ DATE]<=EOMES(..max('Fecha' [Fecha]),0) && Tracker[CUST REQ DATE]>EOMES(..max('Fecha' [Fecha]),-1))))
y LOB = oferta-demanda
Pero me está sorprendiendo al agregar existencias de cierre del mes anterior a la LOB. ¿Podría ayudar en la fórmula para considerar el stock de cierre del mes anterior?
Syndicate_Admin
Administrator
Administrator

@Vinod_P , Tienes que crear acumulativo aquí. Además, debido a que ambos están en la misma tabla, tendrá una unión activa/inactiva al unirse con una tabla de fechas común

Suponga que la combinación de fecha de demanda está inactiva cuando se unen ambas fechas con la misma tabla de fechas

CALCULATE(Count(Table[Supply Date]),filter(date,date[date] <=maxx(date,date[date]))) -

CALCULATE(CALCULATE(Count(Table[Demand Date]),USERELATIONSHIP( Date[Date], Table[Demand Date]))

filter(date,date[date] <=maxx(date,date[date])))

Tabla de fechas

Fecha = Addcolumns(calendar(date(2012,01,01), date(2024,12,31) ), "Month no" , month([date])
, "Año", año([fecha])
, "Mes Año", formato([fecha],"mmm-aa")
, "Ordenación de mes-año", año([fecha])*100 + mes([fecha])
, "Qtr Year", format([date],"yyyy-\QQ")
, "Qtr", trimestre([fecha])
, "Mes",FORMAT([Fecha],"mmmm")
, "Month sort", month([DAte])
, "Año del año fiscal", si( Mes(_max) <7 , año(_max)-1 ,año(_max))
, "es hoy" ,if([fecha]=HOY(),"hoy",[fecha]&"")
,"Día del año" , datediff(date(year([DAte]),1,1), [Date], day)+1
, "Tipo de mes", Switch( True(),
eomonth([Fecha],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Fecha],0)= eomonth(Today(),0),"Este mes" ,
Formato([Fecha],"MMM-AAAA") )
,"Tipo de año" , Switch( True(),
año([Fecha])= año(Hoy()),"Este año" ,
año([Fecha])= año(Hoy())-1,"Último año" ,
Formato([Fecha],"AAAA")
)
)

Consulte los conceptos relacionados

Fecha activa/inactiva

Power BI: Análisis de recursos humanos: empleados a la fecha: https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Inventario de Power BI disponible: https://youtu.be/nKbJ9Cpb-Aw

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.