Forum Discussion
Anonymous
4 years agoNot applicable
Ayuda
Buenas, necesitaría realizar una función o tener una variable que pudiera sumar todos los "Turnos" que se recogen en cada "Fecha". A lo máximo que he llegado es a: Turnos = CALCULATE( DISTINCTCOU...
amitchandak
4 years agoSuper User
Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
you can try a measure like
CALCULATE(
DISTINCTCOUNT('Datos'[TURNO]),
ALLSELECTED('Datos')
)
Anonymous
4 years agoNot applicable
Buenas,
Los datos vendrían dados en la siguiente tabla. Necesitaría el total de días que trabaja cada turno al mes, independientemente de la tienda que sea.
- Anonymous4 years agoNot applicable
HI Anonymous,
You can try to use the following measure formula, it will get the date count based on the 'turno' group and filter by current year month:
measure = VAR currDate = MAX ( 'Datos'[FECHA] ) RETURN CALCULATE ( COUNTROWS ( VALUES ( 'Datos'[FECHA] ) ), FILTER ( ALLSELECTED ( 'Datos' ), YEAR ( 'Datos'[FECHA] ) = YEAR ( currDate ) && MONTH ( 'Datos'[FECHA] ) = MONTH ( currDate ) ), VALUES ( 'Datos'[TURNO] ) )Regards,
Xiaoxin Sheng