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))
User | Count |
---|---|
143 | |
85 | |
63 | |
62 | |
55 |
User | Count |
---|---|
210 | |
108 | |
88 | |
75 | |
70 |