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
treeclauses
Frequent Visitor

Necesito aportar el valor de "Total Dotación" del mes anterior

Hola

Necesito traer el valor de "Total Dotación" de su respectivo "Rol" y "ONU" en una columna diferente.

Ejemplo:

si la fecha de "Fecha"Marzo de 2019, "UN" EIIC y "Rol" ROL GENERAL es 333, necesito en una columna diferente el valor de Febrero de 2019, 285.

2020-04-16 12_18_33-Sin título - Power BI Desktop.png

Le agradecería mucho su ayuda.

1 ACCEPTED SOLUTION

Hola @treeclauses ,

Sí, podemos sumar una columna y una medida. Podrías intentar así:

Measure 2 =
VAR total =
    SUMX ( 'Table', 'Table'[Total Dotación] + [Measure] )
RETURN
    DIVIDE ( total, 2 )

Si no desea hacer un cálculo mientras la medida está en blanco, puede probar esto:

Measure 3 =
VAR total =
    SUMX ( 'Table', 'Table'[Total Dotación] + [Measure] )
RETURN
    IF ( ISBLANK ( [Measure] ), BLANK (), DIVIDE ( total, 2 ) )

3.PNG

Best Regards,
Xue Ding
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

3 REPLIES 3
v-xuding-msft
Community Support
Community Support

Hola @treeclauses ,

Por favor, intente así:

  • Crear una tabla de calendario
Date = CALENDAR(MIN('Table'[Fecha]),MAX('Table'[Fecha]))
  • Crear una medida
Measure = CALCULATE(SUM('Table'[Total Dotación]),DATEADD('Date'[Date],-1,MONTH))

4.PNG

Y hay muchas maneras diferentes de implementarlo. También podría hacer referencia a los videos para tener una oportunidad.

https://www.youtube.com/watch?v=-xBYtOVyMTs

https://www.youtube.com/watch?v=s4HsdoSTNt4

Saludos

Xue Ding

Si este post Ayuda, entonces por favor considereAcéptelo como la soluciónpara ayudar a los otros miembros a encontrarlo más rápidamente.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

¡Funciona! ¡Gracias! @v-xuding-msft

ahora, si quiero sumar los dos valores, y dividir en 2, ¿cómo puedo hacerlo? ¿puedo sumar una columna con una medida?

Hola @treeclauses ,

Sí, podemos sumar una columna y una medida. Podrías intentar así:

Measure 2 =
VAR total =
    SUMX ( 'Table', 'Table'[Total Dotación] + [Measure] )
RETURN
    DIVIDE ( total, 2 )

Si no desea hacer un cálculo mientras la medida está en blanco, puede probar esto:

Measure 3 =
VAR total =
    SUMX ( 'Table', 'Table'[Total Dotación] + [Measure] )
RETURN
    IF ( ISBLANK ( [Measure] ), BLANK (), DIVIDE ( total, 2 ) )

3.PNG

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.