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
Anonymous
Not applicable

OBTENER valor de columna de fila actual mediante Medir

Hola expertos,

Necesito encontrar el valor actual de la columna de fila en medida (columna no calculada) .

Am Teniendo un DAX :

YTD_FINAL á var maxim á MAX('table'[month]) return CALCULATE( SUM('table'[sales] ), ALLEXCEPT('table','table'[year] ,'table'[zzmatnr] ), 'table'[month] <' maxim , 'table'[Year] ? CURRENT ROW Year Column Value )
No puedo usar (función anterior) en ese filtro en mi impuesto de medida ..
puede que por favor ayúdeme..
Screenshot (2).png
¡¡Por favor, ayúdame!!
1 ACCEPTED SOLUTION

@chris_sam

¿Así que necesitas que se corrija el total? espero que los montos de línea están dando el YTD correctamente.

Pruebe esta medida:

YTD_FINAL = 
IF( HASONEVALUE('table'[zzmatnr]),
    CALCULATE( 
        SUM('table'[sales] ), 
        FILTER(
            ALLEXCEPT('table','table'[zzmatnr] ),
            'table'[month] <=MAX('table'[month]) , 'table'[Year] = MAX('table'[Year]) )
    ),
    SUM('table'[sales] )
 )

________________________

Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla

Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
Fowmy
Super User
Super User

@chris_sam

No se puede utilizar la función EARLIER en este contexto,

Para obtener el resultado que espera, modifique su medida de esta manera:

YTD_FINAL = 

CALCULATE( 
    SUM('table'[sales] ), 
    FILTER(
        ALLEXCEPT('table','table'[zzmatnr] ),
        'table'[month] <=MAX('table'[month]) , 'table'[Year] = MAX('table'[Year]) )
)

________________________

Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla

Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy Te probé Measure.. Estoy obteniendo un valor incorrecto cuando estoy usando dos años..Screenshot (3).png

YTD Calc Grand Total debe ser : 70

Por favor, compruebe con captura de pantalla... no está funcionando..

@chris_sam

¿Puede mostrar los resultados esperados y explicar por favor

________________________

Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla

Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy 

 

This The 2018 month Value (Working Fine) :

Screenshot (9).png

 

This is 2019 Month 1 value :

Screenshot (10).png

 

Value which i need in Grand Total is 185 + 35 = 220 ... Value which am getting is 65 (ie . SUM of Year 2019 1st month , 7th Month and 13 Month which is am not even selected in Slicer ..  i selected 2018 all months and 2019 1st Month Only) 

 

 

Screenshot (11).png

 

 

@chris_sam

¿Así que necesitas que se corrija el total? espero que los montos de línea están dando el YTD correctamente.

Pruebe esta medida:

YTD_FINAL = 
IF( HASONEVALUE('table'[zzmatnr]),
    CALCULATE( 
        SUM('table'[sales] ), 
        FILTER(
            ALLEXCEPT('table','table'[zzmatnr] ),
            'table'[month] <=MAX('table'[month]) , 'table'[Year] = MAX('table'[Year]) )
    ),
    SUM('table'[sales] )
 )

________________________

Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla

Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

@Fowmy Screenshot (4).png

2018 all Value2018 all Value2019 1st Month Value2019 1st Month Value2019 1st Moth Value2019 1st Moth Value

 

Its also Taking The Sum of 1st Month of year 2018 Sales value with 1st Month 2019 Sales value 

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.