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
Osganov
Regular Visitor

Ayuda con cálculos de filas sobrefasados basados en fechas

Hola Comunidad:

¿Cómo puedo crear una medida que divida (o cualquier cálculo) de Unidades por forcast en función de cuándo la fecha 1 y la fecha 2 coincidan en una tabla?

Osganov_0-1598060106622.png

Gracias , realmente agradezco su ayuda y el tiempo dedicado a esta investigación.

Oscar

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

Puede intentar usar TREATAS para este.

NewMeasure - unidades var - SUM(Tabla[Unidades])
var dates - VALUES(Table[Date 1])

var forecast ( CALCULATE(SUM(Table[Forecast]), ALL(Table[Date 1), TREATAS(dates, Table[Date 2]))

retorno DIVIDE(unidades, pronóstico)

Si esto funciona para usted, márquelo como la solución. Los elogios también son apreciados. Por favor, avísame si no.

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
mahoneypat
Employee
Employee

Puede intentar usar TREATAS para este.

NewMeasure - unidades var - SUM(Tabla[Unidades])
var dates - VALUES(Table[Date 1])

var forecast ( CALCULATE(SUM(Table[Forecast]), ALL(Table[Date 1), TREATAS(dates, Table[Date 2]))

retorno DIVIDE(unidades, pronóstico)

Si esto funciona para usted, márquelo como la solución. Los elogios también son apreciados. Por favor, avísame si no.

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hola Pat!

Muchas gracias por su tiempo y ayuda, esto funciona muy bien! Realmente lo agradezco.
Su solución refleja cómo es un experto en las felicitaciones de Power BI!!

Tratando de no ser abusivo de su tiempo y conocimiento ¿sabe cómo puedo mostrar el porcentaje "Mensual" (división) basado en Date1 , porque en este punto cuando agrego el campo Date1 a las columnas en un objeto visual Matrix se muestra en blanco.

Gracias de nuevo Pat y felicitaciones por ser una persona tan agradable y de apoyo y usuario axpert.

Oscar

Ashish_Mathur
Super User
Super User

Hola

Suponiendo que las columnas A y B son un conjunto de datos y las columnas C y D son otra, debemos transformar 4 columnas en solo 3 - Fecha, Unidades y Pronóstico. Esto puede suceder combinando los 2 conjuntos de datos por la columna Date del Editor de consultas.

Avísame si esto funciona para ti.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish!

 

That is a good idea , unfortunatelly , i need Date 1 Column "clean" since i am using it for other calculations , by merging both date columns i can compromise the Data, any other thoughts?

 

I Really appreciate your time and help.

 

Thanks

Oscar

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.