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

Nuevas medidas - Año actual semanal, semanal el año pasado, YTD semanal actual y YTD semanal el año pasado

Hola

Tengo una lista de transacciones. Se ejecuta a diario. Lo tengo resumido por la semana que termina.

Algo como esto:

Número de billete ? Fecha de la fecha ? Importe de la cantidad de la cantidad de Fin de semana #

Podría tener varias transacciones todos los días de la semana.

Estoy tratando de crear algunas medidas para capturar:

Importe semanal del año actual

Importe semanal del año pasado

YTD Monto semanal del año actual

y YTD Semanal el año pasado Monto

He probado algunos código... no parece funcionar...

Por favor, aconséjelo.

Jen

9 REPLIES 9
v-lionel-msft
Community Support
Community Support

Hola @JenAtSF ,

¿Desea crear las cuatro medidas siguientes?

a8.PNG

Por favor, proporcione datos de ejemplo para todas las tablas usadas.

Saludos
Lionel Chen

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

Anonymous
Not applicable

Image 2.PNG

Hola @JenAtSF ,

Tal vez puedas hacer lo siguiente:

Weekly Current Year Amount = 
CALCULATE(
    SUM(Sheet1[Amount]),
    FILTER(
        ALL(Sheet1),
        Sheet1[Year] = SELECTEDVALUE( Sheet1[Year]) && Sheet1[Week] = SELECTEDVALUE(Sheet1[Week])
    )
)
Weekly Last Year Amount = 
CALCULATE(
    SUM(Sheet1[Amount]),
    FILTER(
        ALL(Sheet1),
        Sheet1[Year] = SELECTEDVALUE(Sheet1[Year]) - 1 && Sheet1[Week] = SELECTEDVALUE(Sheet1[Week])
    )
)
YTD Weekly Current Year Amount = 
CALCULATE(
    SUM(Sheet1[Amount]),
    FILTER(
        ALLSELECTED(Sheet1),
        Sheet1[Year] = SELECTEDVALUE(Sheet1[Year]) && Sheet1[Week] <= SELECTEDVALUE(Sheet1[Week]) 
    )
)
YTD Weekly Last year Amount = 
CALCULATE(
    SUM(Sheet1[Amount]),
    FILTER(
        ALLSELECTED(Sheet1),
        Sheet1[Year] = SELECTEDVALUE(Sheet1[Year])-1 && Sheet1[Week] <= SELECTEDVALUE(Sheet1[Week]) 
    )
)

Saludos
Lionel Chen

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

Anonymous
Not applicable

Lionel

Gracias por sus sugerencias. Los YTD me están dando balas de fogueo.

Jen

Hola @JenAtSF ,

Puede deberse a la diferencia en nuestro modelo de datos. Además, ¿agregó la función ALLSELECTED() a su fórmula?

Saludos
Lionel Chen

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

parry2k
Super User
Super User

@JenAtSF hay un montón de mensajes sobre inteligencia del tiempo, ¿lo buscaste y lo intentaste?

Aquí hay un enlace a pocos:

https://radacad.com/basics-of-time-intelligence-in-dax-for-power-bi-year-to-date-quarter-to-date-mon...

https://www.red-gate.com/simple-talk/sql/bi/creating-time-intelligence-functions-in-dax/

Me gustaría💖 elogios🙂 si mi solución me ayudara.👉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

Esos son mensajes informativos.

Mi pregunta es más sobre qué hacer con las medidas semanales. El YTD, QTD o MTD funcionan bien para mí. Dadas las funciones WTD o semana a la fecha no están disponibles en Power BI, necesito más orientación.

Gracias

Jen

@JenAtSF hay toneladas de recursos en WTD, así, aquí hay un enlace a una

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



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

Gracias. Creo que hice la pregunta de la manera equivocada.

Toneladas el año pasadoToneladas este añoToneladas del año pasado acumuladasToneladas este año acumulada
Semana 1250238250238
Semana 2300526550764
Semana 3125114675878
Semana 438253810571416
Semana 540541014621826
Semana 650823519702061
Semana 713723321072294

Estoy tratando de crear medidas para los columes acumulativos.

Tengo que seguir ...

Toneladas 2020 acumulativas - TotalYTD(sum('data table'[Tonnes]),'data table'[date],if('data table'[Year]-2020,2020,0))

Está devolviendo números semanales por semana. No culmulativo YTD.

Agradezco su ayuda como siempre.

Jen

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.