cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Recuento distinto en dos columnas

Hola

Estoy tratando de crear una medida que calcule el recuento distinto de usuarios activos en dos columnas, como en el siguiente ejemplo:

Alienvolm_0-1632420460107.png

En ambas columnas hay 4 usuarios activos, pero mi resultado no sería la suma de los dos recuentos distintos (8): el resultado sería 6 (ya que solo hay 6 direcciones de correo electrónico en total, a veces son remitentes y a veces son receptores).

Mi proceso sería anexar las dos columnas y luego calcular un recuento distinto de la columna resultante, pero tengo que usar una medida ya que estoy conectado en modo DirectQuery.

¿Alguna sugerencia sobre cómo puedo lograr esto?

¡Gracias!

Alienvolm

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

@Alienvolm Esencialmente MC Aggregations: Multi-Column Aggregations (MC Aggregations) - Microsoft Power BI Community

En su caso:

Measure =
  COUNTROWS(
    DISTINCT(
      UNION(
        SELECTCOLUMNS('Table',"Email",[Sender]),
        SELECTCOLUMNS('Table',"Email",[Receiver])
      )
    )
  )

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@Alienvolm Esencialmente MC Aggregations: Multi-Column Aggregations (MC Aggregations) - Microsoft Power BI Community

En su caso:

Measure =
  COUNTROWS(
    DISTINCT(
      UNION(
        SELECTCOLUMNS('Table',"Email",[Sender]),
        SELECTCOLUMNS('Table',"Email",[Receiver])
      )
    )
  )

¡Muchas gracias! ¡Eso funcionó!

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors