Forum Discussion
AlejandroPCar
8 years agoHelper IV
External filters does not affect ALLEXCEPT
Hi, I have a measure with ALLEXCEPT that allows me count the number of companies in a sector. In the first table there are 18 companies in that sector so the count works. But in the same sector...
- 8 years ago
you are giving column name in ALLSELECTED whereas it need to be only Table Name
ALLSELECTED( 'Tabla Cruce')
AlejandroPCar
8 years agoHelper IV
Hi, parry2k
Here is it
MEASURE TEST =
VAR ClaseS = CALCULATE( [Número de Empresas], ALLSELECTED( 'Tabla Cruce'[CIIUEmpresa] ) )
VAR GrupoSu = CALCULATE( [Número de Empresas], ALLSELECTED( 'Tabla Cruce'[GRUPOEmpresa] ) )
VAR DivisionS = CALCULATE( [Número de Empresas], ALLSELECTED( 'Tabla Cruce'[DIVISIONEmpresa] ) )
VAR SeccionS = CALCULATE( [Número de Empresas], ALLSELECTED( 'Tabla Cruce'[SECCIONEmpresa] ) )
RETURN
IF( [Número de Empresas] = 0, BLANK(), SWITCH( TRUE,
SUM( 'Tabla Sectores'[id_Sector] ) = 1, ClaseS,
SUM ('Tabla Sectores'[id_Sector] ) = 2, GrupoSu,
SUM ('Tabla Sectores'[id_Sector] ) = 3, DivisionS,
SUM ('Tabla Sectores'[id_Sector] ) = 4, SeccionS ) )
parry2k
8 years agoSuper User
you are giving column name in ALLSELECTED whereas it need to be only Table Name
ALLSELECTED( 'Tabla Cruce')