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.
Hola,
Me gustaría saber las diferencias entre las funciones TOTALYTD y SAMEPERIODLASTYEAR.
¿TOTALYTD comienza en enero y acaba en el mes que se selecciona?
¿En qué oacasiones usan cada una de las fuinciones?
En mi caso hago necesito hacer un informe financiero y calcular el "Year today" de varios años. Por ejemplo necesito volúmenes desde enero a junio de este 2022 y de los años 2021, 2020 y 2019... ¿qué función es la más recomendable apra este caso?
Gracias!
Solved! Go to Solution.
@Josevi , Totalytd, sum up data till date from the start of the year (Date in the rows or context)
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
SAMEPERIODLASTYEAR
give data 1 year behind. Period will be decided by row or the filter context
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
almost same as
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
@Josevi , Totalytd, sum up data till date from the start of the year (Date in the rows or context)
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
SAMEPERIODLASTYEAR
give data 1 year behind. Period will be decided by row or the filter context
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
almost same as
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
@Josevi , Totalytd, sum up data till date from the start of the year (Date in the rows or context)
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
SAMEPERIODLASTYEAR
give data 1 year behind. Period will be decided by row or the filter context
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))
almost same as
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |