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.
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
tipo | area/seccion |
redes | governance |
impresoras | seguridad |
impresoras | pgc |
computadores | auditoria |
computadores | sala ventas |
redes | comunicacion interna |
impresoras | perfuemria |
redes | administracion |
monitores | call-center |
computadores | procesos |
telefonos | mim |
redes | mascotas |
redes | muebles |
computadores | comercial |
computadores | bazar |
computadores | productividad |
impresoras | ferreteria |
computadores | control gestion |
computadores | bodega |
telefonos | cajas |
telefonos | finanzas |
telefonos | compras |
monitores | capacitacion |
monitores | perfumeria |
monitores | ferreteria |
telefonos | comunicaciones |
impresoras | vicepresidencia |
redes | tesoreria |
computadores | contralor |
telefonos | crm |
impresoras | baja ejecutada |
redes | caja central |
telefonos | desarrollo inmobiliario |
monitores | recursos humanos |
redes | gestor de rrhh |
redes | menaje |
telefonos | backup |
monitores | almacen sistemas |
redes | cafeteria |
telefonos | platos preparados |
redes | vicepresidencia |
impresoras | baños y cocina |
computadores | comercial |
telefonos | administrativa |
computadores | cajas |
computadores | crm |
monitores | recursos humanos |
computadores | atencion al cliente |
telefonos | cajas |
telefonos | administracion |
any guidance will be welcome, thank you very much for your help
Solved! Go to Solution.
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] ))
Best Regards
Rena
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] ))
Best Regards
Rena
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
@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.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
95 | |
94 | |
79 | |
71 | |
64 |
User | Count |
---|---|
120 | |
105 | |
99 | |
81 | |
72 |