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
rimbi
New Member

Agrupar cuentas que empiezan igual

Buenos días,

En la tabla tengo algunos clientes que tienen más de una cuenta y las quiero agrupar para tener el valor total de las cuentas, pero que siga en la tabla de Clientes.

Ejemplo:

1. Empresa 1 = 100€

2. Empresa 1 con Rueda = 100€

3. Empresa 1 con Volante = 100€

4. Empresa 2 = 100€

5. Empresa 3 = 100€

6. Empresa 4 = 100€

7. Empresa 4 con Rueda = 100€

8. Empresa 4 con Rueda y Volante = 100€

9. Empresa 5 = 100€

10. Empresa 6 = 100€

 

La idea es poder agrupar por nombre que coincide "Empresa 1" y que agrupe las 3 cuentas con la cifra total 300€. La "Empresa 4" y que agrupe las 2 cuentas con la cifra total 200€. Quedando la tabla:

 

1. Empresa 1 = 300€

2. Empresa 2 = 100€

3. Empresa 3 = 100€

4. Empresa 4 = 200€

5. Empresa 5 = 100€

6. Empresa 6 = 100€

 

Gracias por vuestra colaboración.

 

1 ACCEPTED SOLUTION
v-zhouwen-msft
Community Support
Community Support

Hi @rimbi ,

The Table data is shown below:

vzhouwenmsft_0-1712633725256.png

Please follow these steps:

1. Use the following DAX expression to create a column

Column = LEFT('Table'[Account],9)

2. Use the following DAX expression to create a table

Table 2 = SUMMARIZE('Table','Table'[Column],"Amount",SUM('Table'[Amount]))

3.Final output

vzhouwenmsft_1-1712633820383.png

Best Regards,
Wenbin Zhou
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

2 REPLIES 2
v-zhouwen-msft
Community Support
Community Support

Hi @rimbi ,

The Table data is shown below:

vzhouwenmsft_0-1712633725256.png

Please follow these steps:

1. Use the following DAX expression to create a column

Column = LEFT('Table'[Account],9)

2. Use the following DAX expression to create a table

Table 2 = SUMMARIZE('Table','Table'[Column],"Amount",SUM('Table'[Amount]))

3.Final output

vzhouwenmsft_1-1712633820383.png

Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hola, muchas gracias por la ayuda.

La solución funciona.

Pero si tengo diferentes nombres con más caraceteres como lo hago?:

 

Ejemplo:

Empresa 1100
Empresa 1 con Rueda100
Empresa 1 con volante100
Empresa de servicios 2 100
Empresa de servicios 2 con rueda100
Empresa de bici 3100
Empresa de camion 4100
Empresa de camion 4 con rueda100
empresa de camion 4 con volante100
  
  
Empresa 1300
Empresa de servicios 2 200
Empresa de bici 3100
Empresa de camion 4300

 

Muchas gracias

 

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.