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

¿Por qué el importe total de ventas de ventas de YTD el año pasado?

Hola a todos

Hoy es 1 de enero de 2021 , a continuación se muestra mi expresión de ventas YTD :-

Ventas YTD ?
var _max hoy()
devolución
calculate(TOTALYTD(('SALES'[SALES_]),'Date'[Date]),filter('Date','Date'[Date]<-_max))
¿Puedo saber por qué el retorno de la expresión anterior sigue siendo 1 Ene 2020 hasta 31 Dic 2020 ?
Paul
2 ACCEPTED SOLUTIONS
CNENFRNL
Community Champion
Community Champion

@Paulyeo11 , las funciones xxxYTD, hasta cierto punto, no tienen nada que ver con la fecha real del calendario. Solo las fechas del modelo de datos importan, digamos la última fecha de la tabla SALES en su escenario.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

Ashish_Mathur
Super User
Super User

Hola

Cree una segmentación de datos para Year y arrastre Year desde la tabla de fechas. En la segmentación de datos, seleccione 2021. Estas medidas deberían

Medida 1 - suma('ventas'[sales_])

Medida 2 - calcular([meaure 1],datesytd('Date'[Date],"31/12"))

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hola

Cree una segmentación de datos para Year y arrastre Year desde la tabla de fechas. En la segmentación de datos, seleccione 2021. Estas medidas deberían

Medida 1 - suma('ventas'[sales_])

Medida 2 - calcular([meaure 1],datesytd('Date'[Date],"31/12"))

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hola ASH

Trato de obtener ventas LYTD usando a continuación, no está funcionando , como error dateslytd :-
VENTAS LYTD ASH ?
calculate([SALES_],dateslytd('Date'[Date],"31/12"))
Paul

Prueba esta medida

Medida 3 - calcular([medida 2],sameperiodlastyear('Fecha'[Fecha]))

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hola Ash

interesante conocer esta expresión tan simple de crear YTD.

Gracias

Paul

De nada.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
CNENFRNL
Community Champion
Community Champion

@Paulyeo11 , las funciones xxxYTD, hasta cierto punto, no tienen nada que ver con la fecha real del calendario. Solo las fechas del modelo de datos importan, digamos la última fecha de la tabla SALES en su escenario.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Paulyeo11
Impactful Individual
Impactful Individual

Hola Señor

¿Quiere decir que una de mis tablas de ventas tiene factura para 2021, por ejemplo 4 enero have salesamount 1000. Entonces las ventas YTD mostrarán 1000 derecho ?

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.