Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hola
Tengo esta medida acumulativa que funciona bien:
Cumulative Change Notes =
CALCULATE (
COUNTA ( Company_Documents[ID] ),
FILTER (
ALLSELECTED ( Company_Documents ),
Company_Documents[DOC_CREATION_DATE]
<= MAX ( Company_Documents[DOC_CREATION_DATE] )
)
)
Sin embargo, me gustaría limitar el resultado agregando un criterio adicional al filtro (comienza &&)
Cumulative Change Notes =
CALCULATE (
COUNTA ( Company_Documents[ID] ),
FILTER (
ALLSELECTED ( Company_Documents ),
Company_Documents[DOC_CREATION_DATE]
<= MAX ( Company_Documents[DOC_CREATION_DATE] )
&& Company_Documents[Document Class] = "Change Note"
)
)
Debo tener la sintaxis incorrecta, ya que hay registros disponibles que coinciden con los criterios.
¿Puede alguien darme un puntero sobre dónde me he equivocado al agregar los criterios de filtro adicionales?
Gracias
Richard
Hola @RichardJ
Prueba esto.
Cumulative Change Notes =
VAR __maxCreationDate = MAX ( Company_Documents[DOC_CREATION_DATE] )
RETURN
CALCULATE (
COUNTA ( Company_Documents[ID] ),
ALLSELECTED ( Company_Documents ),
Company_Documents[DOC_CREATION_DATE] <= __maxCreationDate,
Company_Documents[Document Class] = "Change Note"
)
@Mariusz Muchas gracias por la idea y la respuesta rápida.
Esto funciona perfectamente.
Inicialmente no pensé que hubiera funcionado ya que no le estaba dando suficiente tiempo para calcular (circa 5 segundos) la respuesta.
Gracias de nuevo,
Richard
@Mariusz: el archivo vinculado muestra las fórmulas que proporcionó trabajando. Perfectamente.
Tuve que revertir mi archivo real (no este extracto) para que funcionara correctamente, ya que se había corrompido de alguna manera.
Esperemos que el ejemplo de trabajo adjunto ayude a alguien en el futuro.
Gracias de nuevo @Mariusz - conseguir una solución para esto hizo mi día.
Salud
Richard
@Mariusz Gracias por la respuesta y la buena idea, pero por desgracia no ha funcionado.
He comprobado el valor De tabla[Columna] y "Cambiar nota" y estoy preciso, así que no estoy seguro de qué más probar.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |