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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
rimbi
Regular Visitor

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.