Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
StuartSmith
Power Participant
Power Participant

Forma más efectiva de tener valores de tarjeta en blanco

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...

5G_in_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'[OData_5GAvailable]," "), " " "
Eso mira cada filtro y si los filtros están en blanco, la tarjeta estará en blanco, pero si sólo hay un registro (IF(COUNT('Carrier Matrix'[Key]) ?1), ese registro se muestra en la tarjeta, pero obviamente, cuando el informe se carga, tiene que ejecutar lotes y muchas medidas incluso antes de que se muestren los datos y el tiempo de carga del informe sea lento. Hasta que el soporte de "Tarjetas" se vacíe, ¿alguien tiene una forma efectiva de hacer que las tarjetas no muestren nada a menos que el filtrado esté activo?
Gracias de antemano,
1 ACCEPTED 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.

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.