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
Paulyeo11
Impactful Individual
Impactful Individual

Busque ayuda para convertir YTD a LYTD

Hola a todos

A continuación tengo la expresión del Sr. Ash :-

YTD Total á if(ISBLANK([Total]),BLANK(),if(MIN('Date'[Date])>today(),BLANK(),CALCULATE([Total],DATESYTD('Date'[Date],"31/12"),ALL('Table'[GL CODE])))
¿Puede alguien ayudarme a convertir por encima del LYTD.
Paul
1 ACCEPTED SOLUTION

@Paulyeo11 ,

Eso está funcionando bien, lo comprocha. Refre la siguiente captura de pantalla. LYTD es 10. Refre segundo para el valor en la tabla para 2019 también.

Ambos valores son los mismos y adjuntar el archivo para su referencia.

https://www.dropbox.com/s/qqembxhjv7d8aos/HOW%20TO%20COMPUTE%20REVENUE%20YTD%20V0006.pbix?dl=0

manikumar34_0-1603268694898.png

manikumar34_1-1603268750783.png

saludos

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




View solution in original post

8 REPLIES 8
v-deddai1-msft
Community Support
Community Support

Hola @Paulyeo11 ,

Puedes usar algo como:

YTD Total =
IF (
    ISBLANK ( [Total] ),
    BLANK (),
    IF (
        MIN ( 'Date'[Date] ) > TODAY (),
        BLANK (),
        CALCULATE (
            [Total],
            DATEADD ( DATESYTD ( 'Date'[Date], "31/12" ), -1, YEAR ),
            ALL ( 'Table'[GL CODE] )
        )
    )
)

Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Saludos

Dedmon Dai

Hola Señor

Todavía recibo un error en Total .

https://www.dropbox.com/s/xr0lb692d2yv81o/HOW%20TO%20COMPUTE%20REVENUE%20YTD%20V0006.pbix?dl=0

Arriba está mi archivo PBI

Paulyeo11_0-1603267628247.png

Hola @Paulyeo11 ,

No tiene columna Total ni Medida total en el modelo de datos. Usa la fórmula que sugerí anteriormente.

Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Saludos

Dedmon Dai

Hola Señor

Lamento mucho que todavía estoy perdido. Si utilizo la expresión de nuevo, seguirá siendo un error.

Paul

@Paulyeo11 ,

Eso está funcionando bien, lo comprocha. Refre la siguiente captura de pantalla. LYTD es 10. Refre segundo para el valor en la tabla para 2019 también.

Ambos valores son los mismos y adjuntar el archivo para su referencia.

https://www.dropbox.com/s/qqembxhjv7d8aos/HOW%20TO%20COMPUTE%20REVENUE%20YTD%20V0006.pbix?dl=0

manikumar34_0-1603268694898.png

manikumar34_1-1603268750783.png

saludos

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




Hi Hands

Muchas gracias, ahora el valor aparece. Necesito seguir comprobandolo más tarde.

Paul

Hola Ded

Gracias por compartir , obtengo el error a continuación :-

Mi archivo PBIX :-

https://www.dropbox.com/s/q93wobh5avy7n9b/HOW%20TO%20COMPUTE%20REVENUE%20YTD%20V0005.pbix?dl=0

Paulyeo11_0-1603187439735.png

Hola @Paulyeo11 ,

Por favor, utilice el siguiente:

YTD Total = 
IF (
    ISBLANK (SUM('Table'[AMOUNT]) ),
    BLANK (),
    IF (
        MIN ( 'Date'[Date] ) > TODAY (),
        BLANK (),
        CALCULATE (
           SUM('Table'[AMOUNT]),
            DATEADD ( DATESYTD ( 'Date'[Date], "31/12" ), -1, YEAR ),
            ALL ( 'Table'[GL CODE] )
        )
    )
)

Si este post ayuda, entonces considera Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Saludos

Dedmon Dai

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.