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
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
v-yiruan-msft
Community Support
Community Support

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

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

View solution in original post

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you very much @v-yiruan-msft , 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
Super User
Super User

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

 

 


@ 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!:
The Definitive Guide to Power Query (M)

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