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
sv98917n
Helper I
Helper I

Marcar duplicados como Sí/No, pero sin incluir espacios en blanco

Hola a todos,

Estoy tratando de marcar valores duplicados con la siguiente medida ya que necesito que funcione con mis filtros de página:

ID de segmento crítico (Y/N) - IF (COUNTROWS ( FILTER ( allselected(Table1), Table1[SEGMENT_ID] ? MAX( Table1[SEGMENT_ID] ) ) ) ) > ?2, "YES", "NO" )
Mi único problema es que está marcando mis ID de segmento en blanco como un duplicado y devolver "Sí".
¿De todos modos para que ignore los espacios en blanco?
¡Gracias!
1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hola @sv98917n ,

Filtre el valor en blanco antes de contar las filas, compruebe la fórmula siguiente.

Column =
VAR countid =
    CALCULATE (
        COUNTROWS ( FILTER ( 'Table', 'Table'[value] <> BLANK () ) ),
        ALLEXCEPT ( 'Table', 'Table'[id] )
    )
RETURN
    IF ( countid > 1, "yes", "no" )

1.PNG

Saludos

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hola @sv98917n ,

Filtre el valor en blanco antes de contar las filas, compruebe la fórmula siguiente.

Column =
VAR countid =
    CALCULATE (
        COUNTROWS ( FILTER ( 'Table', 'Table'[value] <> BLANK () ) ),
        ALLEXCEPT ( 'Table', 'Table'[id] )
    )
RETURN
    IF ( countid > 1, "yes", "no" )

1.PNG

Saludos

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@sv98917n , Probar como

ID de segmento crítico (Y/N) á IF (COUNTROWS ( FILTER ( allselected(Table1), Table1[SEGMENT_ID] ? MAX( Table1[SEGMENT_ID] ) ) ) >-2 && not(isblank(Table1[SEGMENT_ID])), "YES", "NO" )

No me deja usar la columna [SEGMENT_ID] después de la no (esblank al final. Dice que tiene que ser una medida para funcionar.

darentengmfs
Post Prodigy
Post Prodigy

Hola @sv98917n

Intente agregar ISBLANK() en su fórmula

IF(ISBLANK(Table1[SEGMENT_ID]), "No"),IF (COUNTROWS ( FILTER ( allselected(Table1), Table1[SEGMENT_ID] ? MAX( Table1[SEGMENT_ID] ) ) ) >-2, "YES", "NO" ))

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.