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
nuriac
Helper III
Helper III

Distribuir un importe entre dos fechas

Hola, 

me gustaria saber que fórmula debo usar para poder distribuir el importe (de un pedido) entre dos fechas, la fecha de inciio y la de finalización del servicio. 

La idea es que teniendo un importe y la fecha de inicio y fin, puesa saber qué importe facturaré cada mes.

Ejemplo:

Pedido 1: 100.000€; inicio 1/11/2020 y fin 1/11/2021

 

aunque he visto algun post con información similar, no he sabido aplicarlo.

gracias

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@nuriac , Compruebe si el archivo adjunto puede ayudarle.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@nuriac , Compruebe si el archivo adjunto puede ayudarle.

Me pone los valores correctos, pero solo me salen en un mes, por ejemplo si un pedido dura de enero a mayo, solo me salen valores para ese pedido en el mes de enero. El valor de enero es correcto, pero me faltan datos en los otros meses.

 
Value by day of Month = CALCULATE(SUMX(SUMMARIZE(filter(CROSSJOIN(CALENDARIO,'PEDIDOS DE VENTA'),CALENDARIO[Date] >= 'PEDIDOS DE VENTA'[Fecha Envío]&& CALENDARIO[Date]<= 'PEDIDOS DE VENTA'[Fecha fin]),'PEDIDOS DE VENTA'[Nº Pedido de Venta],CALENDARIO[Date],'PEDIDOS DE VENTA'[[Measures]].[Facturacion Prevista]]],'PEDIDOS DE VENTA'[Fecha Envío],'PEDIDOS DE VENTA'[Fecha fin]),DIVIDE('PEDIDOS DE VENTA'[[Measures]].[Facturacion Prevista]]],DATEDIFF('PEDIDOS DE VENTA'[Fecha Envío],'PEDIDOS DE VENTA'[Fecha fin],DAY)+1)))

SOLUCIONADO.

Tenia relacionado el calendario con la fecha de inicio y por eso no repartia correctamente entre los meses. Quitando la relación ha quedado perfecto.

Gracias

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.