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.
Tengo un informe que actualmente tiene alrededor de 20 tarjetas en él, mostrando varios bits de datos, pero con la naturaleza de "Tarjetas", siempre quiere mostrar el primer valor de su respectiva columna si no hay filtrado. Por lo tanto, tengo una medida para cada tarjeta que parece...
Solved! Go to Solution.
Estaba pensando en esto anoche, y una manera de reducir el código para acelerar la ejecución del código...
Country_Measure de la red de trabajos IF(ISFILTERED('Carrier Matrix'[Region]) && HASONEVALUE('Carrier Matrix'[Region]) ? ISFILTERED('Carrier Matrix'[País]) && HASONEVALUE('Matriz de portadora'[País]) ? ISFILTERED('Carrier Matrix'[Carrier]) && HASONEVALUE('Carrier Matrix'[Carrier]) ? ISFILTERED('Carrier Matrix'[OData__2_Contractstatus/planning]) && HASONEVALUE('Carrier Matrix'[OData__2_Contractstatus/planning]), IF(COUNT('Carrier Matrix'[Key]) ?1, LASTNONBLANK('Carrier Matrix'[Country]," "), " " " ")
y pensando en lo que hace el código, comprueba si se aplica algún filtro y luego solo muestra los datos en una tarjeta si solo hay 1 fila. Por lo tanto, podría eliminar la comprobación de pasos de filtro y simplemente contar el número de filas, lo que reduce el procesamiento de sobrecarga.
Country_Measure Test-IF(COUNT('Carrier Matrix'[Key]) 1, LASTNONBLANK('Carrier Matrix'[Country]," "), " ")
¿Alguien ve algún problema con lo anterior? He probado y parece funcionar.
@StuartSmith , creo que sólo has seguido este camino. Lo único es que tienes paréntesis en && declaración
(ISFILTERED('Carrier Matrix'[Region]) && HASONEVALUE('Carrier Matrix'[Region])) ? ()
Estaba pensando en esto anoche, y una manera de reducir el código para acelerar la ejecución del código...
Country_Measure de la red de trabajos IF(ISFILTERED('Carrier Matrix'[Region]) && HASONEVALUE('Carrier Matrix'[Region]) ? ISFILTERED('Carrier Matrix'[País]) && HASONEVALUE('Matriz de portadora'[País]) ? ISFILTERED('Carrier Matrix'[Carrier]) && HASONEVALUE('Carrier Matrix'[Carrier]) ? ISFILTERED('Carrier Matrix'[OData__2_Contractstatus/planning]) && HASONEVALUE('Carrier Matrix'[OData__2_Contractstatus/planning]), IF(COUNT('Carrier Matrix'[Key]) ?1, LASTNONBLANK('Carrier Matrix'[Country]," "), " " " ")
y pensando en lo que hace el código, comprueba si se aplica algún filtro y luego solo muestra los datos en una tarjeta si solo hay 1 fila. Por lo tanto, podría eliminar la comprobación de pasos de filtro y simplemente contar el número de filas, lo que reduce el procesamiento de sobrecarga.
Country_Measure Test-IF(COUNT('Carrier Matrix'[Key]) 1, LASTNONBLANK('Carrier Matrix'[Country]," "), " ")
¿Alguien ve algún problema con lo anterior? He probado y parece funcionar.
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 | |
2 | |
2 | |
2 | |
1 |