cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Diferencia acumulada

Tengo una tabla como la de abajo que tiene las ventas acumuladas por mes, necesito calcular el valor real del mes considerando que hay varias empresas que tienen diferentes sucursales y que cada una puede pertenecer a una categoría diferente.

Otra opción podría ser crear una columna con los datos anteriores y luego realizar la resta, pero también tengo problemas con eso.

Considera que la tabla real tiene más empresas, sucursales y va del 1/2019 al 7/2023

reneM2026_1-1695387433905.png

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Me las arreglé para hacerlo de esta manera. Primero cree una columna que tenga el valor anterior de las ventas.

Venta anterior =
DÓNDE AnteriorFecha = FECHAAÑADIR(BASE[Fecha], -1, MES)
DEVOLUCIÓN
SI(BASE[NUM_MONTH] = 1, 0,
SUMX(
FILTRO(
'BASE',
'BASE'[FECHA] = Fecha anterior &&
BASE[Empresa] = ANTERIOR(BASE[Empresa]) &&
BASE[Sucursal] = ANTERIOR(BASE[Sucursal])
),
BASE[Ventas]
)
)
Luego utilicé una métrica como la siguiente.
Ventas mensuales = SUMA(BASE[Ventas]) - SUMA(BASE[Venta anterior])
De esa manera logré obtener las ventas mensuales por empresa y sucursales (Corredora = Empresa, Producción = Ventas, Producción Mensual = Ventas mensuales)
reneM2026_0-1695397272762.png

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors