Forum Discussion
Max Total
Hola a todos
Quiero tener un gran total de valores máximos
Así es como se ve el conjunto de datos
Ejemplo de conjunto de datos
a veces tengo 2 fechas, a veces 3 fechas, pero el objetivo tiene que ser el mismo, por lo tanto, estoy luchando para utilizar las funciones "x", como sumx y maxx.
8 Replies
- msksenthilHelper III
@luisClive puede probar lo siguiente
SUMX ( DISTINCT ( 'TableName' ), 'TableName'[FieldName] )- AnonymousNot applicable
tnks
He intentado esto antes, ya que todos los valores son distintos, sólo que algunos datos faltan todos los días y quiero poner max independientemente
- msksenthilHelper III
Anonymous Thanks,
I believe you have many fields with different values on each record, in this case, we have calculated by not considering the other fields except the required fields like 'date' & 'Target Hours'
SUMX (
SUMMARIZE ( Maxhours, Maxhours[Date], "Hours", MAX ( Maxhours[Target hours] ) ),
[Hours]
)Hope this helps,
MS
- AnonymousNot applicable
@msksenthil tnks me permiten probar la función Summarize, déjame comprobarlo
@FrankAT gracias, no he usado inscope antes, yo compruebo esto también
- FrankATCommunity Champion
Hola @luisClive
puedes hacerlo así:
Sum of Distinct Target Hours = VAR _Sum = SUM('Table'[Target Hours]) VAR _Table = DISTINCT('Table'[Target Hours]) RETURN IF(ISINSCOPE('Table'[Date]),_Sum, SUMX(_Table,'Table'[Target Hours]))Con saludos amables desde la ciudad donde la leyenda del 'Pied Piper de Hamelin' está en casa
FrankAT (Orgulloso de ser un Datanaut) - msksenthilHelper III
Anonymous Sure 👍
- AnonymousNot applicable
no sé si esto está hinchado, me hizo trabajar con este
Me olvidé de resumir antes
Medidas ?Var MaxTarget á maxx('Staff Daily Utilisation','Staff Daily Utilisation'[Target Max As per current working Days])Var MaxTargetTotal ? SUMMARIZE('Staff Daily Utilisation','Staff Daily Utilisation'[Staff Name],"Max Total",MaxTarget)devoluciónif(HASONEVALUE('Staff Daily Utilisation'[Nombre del personal]),MaxTarget,SUMX(MaxTargetTotal,[Max Total]))
- msksenthilHelper III
Anonymous I used Measure to calculate the numbers