Forum Discussion
Syndicate_Admin
5 years agoAdministrator
FILTER does not affect segmentation
Good, I need a FILTER that is not affected when filtering by a segmentation.
In the following example, you would need that if you filter on a segmentation [Day] by Monday or Tuesday, the denominator does NOT become null.
Ratio Distance 2 =
DIVIDE(
SUM('T_Datos_GPS'[Last Distance(km)]);
CALCULATE(AVERAGE('T_Datos_GPS'[Distance (km)]); FILTER('T_Día_semana';' T_Día_semana'[Día]="sunday"))
)
Try one of these:
Ratio Distance 2 = DIVIDE ( SUM ( 'T_Datos_GPS'[Last Distance(km)] ), CALCULATE ( AVERAGE ( 'T_Datos_GPS'[Distance (km)] ), FILTER ( 'T_Día_semana', ' T_Día_semana'[Día] IN {"Sunday","Monday" ) ) )
orRatio Distance 2 = DIVIDE ( SUM ( 'T_Datos_GPS'[Last Distance(km)] ), CALCULATE ( AVERAGE ( 'T_Datos_GPS'[Distance (km)] ), FILTER ( ALL('T_Día_semana'), ' T_Día_semana'[Día] IN {"Sunday","Monday" ) ) )
1 Reply
- FowmySuper User
Try one of these:
Ratio Distance 2 = DIVIDE ( SUM ( 'T_Datos_GPS'[Last Distance(km)] ), CALCULATE ( AVERAGE ( 'T_Datos_GPS'[Distance (km)] ), FILTER ( 'T_Día_semana', ' T_Día_semana'[Día] IN {"Sunday","Monday" ) ) )
orRatio Distance 2 = DIVIDE ( SUM ( 'T_Datos_GPS'[Last Distance(km)] ), CALCULATE ( AVERAGE ( 'T_Datos_GPS'[Distance (km)] ), FILTER ( ALL('T_Día_semana'), ' T_Día_semana'[Día] IN {"Sunday","Monday" ) ) )