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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

maximum values with matrix count

good morning masters

I hope that you and your families are well in these difficult times of pandemic.
I need help with a dax calculation that allows me to locate the maximum value of each "area" and "type" to display it in a matrix
The result that I hope should be similar to how it is shown on the screen, however here it should not count the number "boxes" to 3 but as the maximum value of each line that is 2
I attach a fragment of my data as an example

 

ejemplo.png

 

tipoarea/seccion
redesgovernance
impresorasseguridad
impresoraspgc
computadoresauditoria
computadoressala ventas
redescomunicacion interna
impresorasperfuemria
redesadministracion
monitorescall-center
computadoresprocesos
telefonosmim
redesmascotas
redesmuebles
computadorescomercial
computadoresbazar
computadoresproductividad
impresorasferreteria
computadorescontrol gestion
computadoresbodega
telefonoscajas
telefonosfinanzas
telefonoscompras
monitorescapacitacion
monitoresperfumeria
monitoresferreteria
telefonoscomunicaciones
impresorasvicepresidencia
redestesoreria
computadorescontralor
telefonoscrm
impresorasbaja ejecutada
redescaja central
telefonosdesarrollo inmobiliario
monitoresrecursos humanos
redesgestor de rrhh
redesmenaje
telefonosbackup
monitoresalmacen sistemas
redescafeteria
telefonosplatos preparados
redesvicepresidencia
impresorasbaños y cocina
computadorescomercial 
telefonosadministrativa
computadorescajas
computadorescrm
monitoresrecursos humanos
computadoresatencion al cliente
telefonoscajas
telefonosadministracion

 

any guidance will be welcome, thank you very much for your help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

You can create 2 measures as below:

Count of cantidad = CALCULATE ( DISTINCTCOUNT ( 'Table'[cantidad] ) )
Measure 3 = MAXX ( VALUES ( 'Table'[area/seccion] ),MAXX ( VALUES ( 'Table'[tipo] ), [Count of cantidad] ))

maximum values with matrix count.JPG

Best Regards

Rena

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

You can create 2 measures as below:

Count of cantidad = CALCULATE ( DISTINCTCOUNT ( 'Table'[cantidad] ) )
Measure 3 = MAXX ( VALUES ( 'Table'[area/seccion] ),MAXX ( VALUES ( 'Table'[tipo] ), [Count of cantidad] ))

maximum values with matrix count.JPG

Best Regards

Rena

Anonymous
Not applicable

Thank you very much @Anonymous , it is what I was looking for to solve my problem.
Is it possible some way of solution with the same result but in variables?
again thanks for the quick response

Greg_Deckler
Community Champion
Community Champion

@Anonymous - I'm not sure what I am looking at here. What is cantidad? I mean, I'm pretty sure that means amount but where is that coming from? This might help: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434

 

Otherwise please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.

 

 



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...
Anonymous
Not applicable

Thank you @Greg_Deckler very much for coming to my aid, unfortunately when summarizing the table it takes the sum of the sub-elements, but its solution based on variables is very attractive and elegant for me

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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