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

Cómo obtener un valor específico basado en month(YTD)

Hola a todos, me gustaría obtener un valor específico basado sólo en un mes específico.

IdFechaYTD

1

12/31/2018400

1

1/1/2019500
112/31/2019800
25/1/2019300
212/31/2019400

Basándome en este ejemplo, quiero obtener los valores de los identificadores específicos para el 31 de diciembre, esto es para mí para obtener una comparación de YOY ADB

1 ACCEPTED SOLUTION

@jphiljuach aquí es la medida

Year End Value = 
VAR __lastDate = 
DATE ( 
    YEAR ( 
        MAX ( 'Table'[Date] ) 
    ) , 12, 31 
)

RETURN 
CALCULATE ( 
    MAX ( 'Table'[YTD] ), 
    ALLEXCEPT ( 'Table','Table'[ID], 'Table'[Date] ), 
    KEEPFILTERS ( 'Table'[Date]  = __lastDate ) 
)

y aquí está la salida

image.png

Me gustaría elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@jphiljuach , No muy claro, pero esto debe dar

LASTNONBLANKVALUE(table[DATE], sum(Table[YTD])) // puede utilizar max si es necesario
LASTNONBLANKVALUE(table[DATE], sum(Table[ID]))

YTD QTY - TOTALYTD(max(Table[YTD]),'Fecha'[Fecha])
LYTD QTY - TOTALYTD(max(Table[YTD]),dateadd('Date'[Date],-1,year))

parry2k
Super User
Super User

@jphiljuach Realmente no está claro lo que está tratando de lograr? ¿Elegirás un mes de la cortadora? ¿Qué quieres decir con un mes específico? ¿Puedes por favor elaborar más?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Tengo esta tabla donde tengo un YTD por mes, estoy tratando de obtener una nueva columna que sólo mostrará el valor específico en diciembre.

E.g

IdFechaYTD
00110/31/20183000
00111/31/20184000
00112/31/20184500
00111/31/20194000
00112/31/20196000
00210/31/20184500
00212/31/2018200
00211/31/20195000
00212/31/2019600

Ahora quiero tener un resultado que produzca esto:

IdFechaYTDFINAL ADB
00110/31/20183000
00111/31/20184000
00112/31/201845004500
00111/31/20194000
00112/31/201960006000
00210/31/20184500
00212/31/2018200200
00211/31/20195000
00212/31/2019600600

@jphiljuach aquí es la medida

Year End Value = 
VAR __lastDate = 
DATE ( 
    YEAR ( 
        MAX ( 'Table'[Date] ) 
    ) , 12, 31 
)

RETURN 
CALCULATE ( 
    MAX ( 'Table'[YTD] ), 
    ALLEXCEPT ( 'Table','Table'[ID], 'Table'[Date] ), 
    KEEPFILTERS ( 'Table'[Date]  = __lastDate ) 
)

y aquí está la salida

image.png

Me gustaría elogiossi mi solución me ayudó.👉Si puedes pasar tiempo publicando la pregunta, también puedes hacer esfuerzos para darle a Kudos quien haya ayudado a resolver tu problema. ¡Es una muestra de agradecimiento!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

funcionó, muchas gracias por esto!

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.