-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy path% YTD Respecto PY.dax
More file actions
25 lines (25 loc) · 879 Bytes
/
% YTD Respecto PY.dax
File metadata and controls
25 lines (25 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
% Acumulado Respecto al Total de Año Anterior =
// Si necesitas cambiar el separador de lista de esta expresión de Punto y Coma (;) a Coma (,), por favor:
// Abra este archivo con DAX Studio (https://daxstudio.org/) y utilce el comando: Swap Delimertes y luego
// Copie y pegue la expresión desde el propio DAX Studio.
VAR ListaDeFechas =
IF(
HASONEVALUE( Calendario[Año] ) ;
VAR ValorAcumuladoALaFecha =
CALCULATE(
"REFERENCIA_A_TU_MEDIDA_AQUÍ" ;
DATESYTD( Calendario[Fecha] )
)
VAR TotalDelAnPasado =
CALCULATE(
"REFERENCIA_A_TU_MEDIDA_AQUÍ" ;
PARALLELPERIOD(
Calendario[Fecha] ;
-1 ;
YEAR
)
)
RETURN
DIVIDE( ValorAcumuladoALaFecha ; TotalDelAnPasado ) ;
"Seleccione 1 año"
)