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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
ngct1112
Post Patron
Post Patron

Cómo contar el recuento distinto de una columna

Hola a todos, me gustaría contar cuántas veces el valor distintivo de "Producto">1. ¿Alguien podría aconsejar cómo agregar esta medida? En este caso, Producto A, B, C, estos 3 productos se producen más de 1, por lo que la anwer debe ser 3

IdProducto
1A
2B
3C
4A
5A
6B
7D
8E
9F
10C
3 ACCEPTED SOLUTIONS
Greg_Deckler
Community Champion
Community Champion

Quizás:

Measure =
  VAR __Table = 
    SUMMARIZE(
      'Table',
      [Product],
      "__Count",COUNTROWS('Table')
    )
RETURN
  COUNTROWS(FILTER(__Table,[__Count]>1))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

Hola

Escribir estas medidas

Total price = SUM(Data[Net Price])
Measure = SUMX(FILTER(SUMMARIZE(VALUES(Data[Product]),Data[Product],"ABCD",COUNTROWS(Data),"EFGH",[Total price]),[ABCD]>1),[EFGH])

Arrastre la segunda medida al objeto visual. El resultado será 130.

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Hola

Escriba esta medida

Medidas: SUMX(FILTER(SUMMARIZE(VALUES('Table1'[Product]),'Table1'[Product],"ABCD",CALCULATE(COUNTROWS('Table1'),Table1[Net Price]>0),"EFGH",[Total price]),[ABCD]>1&&[EFGH]<>BLANK()),[EFGH]))))))))))))))))))).)).)))))))))))))))))))))))))))))))))))))))))))))))/[ABCD]>1&&[EFGH]<>BLANK()),[EFGH]))))))))))))))))))________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

12 REPLIES 12
Greg_Deckler
Community Champion
Community Champion

Quizás:

Measure =
  VAR __Table = 
    SUMMARIZE(
      'Table',
      [Product],
      "__Count",COUNTROWS('Table')
    )
RETURN
  COUNTROWS(FILTER(__Table,[__Count]>1))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

se ve perfecto. ¡Gracias por tu ayuda!

¿Puedo preguntar además que hay alguna manera de calcular el "Precio" por el filtro anterior (contar producto >1)?

A+B+C-10+20+30+10+10+20+30

Se apreciará si hay alguna solución.

IdProductoPrecio neto
1A10
2B20
3C30
4A10
5A10
6B20
7D40
8E50
9F60
10C30

Hola

Escribir estas medidas

Total price = SUM(Data[Net Price])
Measure = SUMX(FILTER(SUMMARIZE(VALUES(Data[Product]),Data[Product],"ABCD",COUNTROWS(Data),"EFGH",[Total price]),[ABCD]>1),[EFGH])

Arrastre la segunda medida al objeto visual. El resultado será 130.

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur Esto está funcionando perfectamente. Realmente apreciado!

@Ashish_Mathur , si es posible, me gustaría hacer un poco más basado en su fórmula proporcionada.

Para el mismo método de cálculo, ¿es posible que pueda contar "Procduct >1" sólo si "Precio neto" no está vacío?

Si este caso, el recuento de "C" es 1

sólo A & B es >1 y el precio de suma será 70.

Intento algo como pero no funciona.

Medidas: SUMX(FILTER(SUMMARIZE(VALUES('Table1'[Product]),'Table1'[Product],"ABCD",COUNTROWS('Table1'),"EFGH",[Precio total]),[ABCD]>1),[EFGH]<>BLANK())
IdProductoPrecio neto
1A10
2B20
3C
4A10
5A10
6B20
7D
8E50
9F60
10C30

Hola

Pruebe esta medida

Medidas: SUMX(FILTER(SUMMARIZE(VALUES('Table1'[Product]),'Table1'[Product],"ABCD",COUNTROWS('Table1'),"EFGH",[Precio total]),[ABCD]>1&&[EFGH]<>BLANK()),[EFGH])

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur He probado las dos de estas dos medidas, todavía no puede obtener la respuesta de 70. Todavía cuentan el valor de C.

Se aprecia si pudiera sugerir

Medidas1 - SUMX(FILTER(SUMMARIZE(VALUES('Table1'[Product]),'Table1'[Product],"ABCD",
COUNTROWS('Table1'),"EFGH",[Precio total]),[ABCD]>1&&[EFGH]<>BLANK()),[EFGH])

Medida: CALCULATE(
SUM(Tabla1[Precio neto]),
FILTRO(Tabla1,Tabla1[Columna Countif]>1 && Tabla1[Precio neto] <>Blank()))Countif1.JPG

Hola

Escriba esta medida

Medidas: SUMX(FILTER(SUMMARIZE(VALUES('Table1'[Product]),'Table1'[Product],"ABCD",CALCULATE(COUNTROWS('Table1'),Table1[Net Price]>0),"EFGH",[Total price]),[ABCD]>1&&[EFGH]<>BLANK()),[EFGH]))))))))))))))))))).)).)))))))))))))))))))))))))))))))))))))))))))))))/[ABCD]>1&&[EFGH]<>BLANK()),[EFGH]))))))))))))))))))________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________

Espero que esto ayude.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Es brillante. Muchas gracias

De nada.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Greg_Deckler ¿Piensas en hacerlo de todos modos. Muchas gracias

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.