cancel
Showing results for
Did you mean:
Helper I

## Create a separate table from another with unique values ​​and a total column

good morning, I hope you can help me, I want to create a table from another, what I want is for the new table to take the unique values ​​with the total amount

These are the two columns in which I want to generate the new table with unique values

1 ACCEPTED SOLUTION
Super User

En ese caso usa el código DAX equivalente a:

``````Tabla cantidad por código =
SUMMARIZE ( fTable, fTable[Código], fTable[Descripción] ),
CALCULATE (
FILTER ( fTable, fTable[Código] = EARLIER ( fTable[Código] ) )
)
)
``````

Pero si lo que necesitas es visualizar las cantidades, lo único que necesitas es crear una medida tipo :

``Suma de Cantidad = SUM(fTable[Cantidad])``

y creas un visual de tabla con los campos originales de código y descripción & la medida:

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

3 REPLIES 3
Super User

Try this pattern:

``````Tabla cantidad por código =
VALUES ( fTable[Código] ),
CALCULATE (
FILTER ( fTable, fTable[Código] = EARLIER ( fTable[Código] ) )
)
)
``````

However, is there a particular reason you  need to create these new physical tables? These sort of operations are normally done using measures in visuals

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

Helper I

@PaulDBrown Thank you very much seriously, the reason why I am discovering this table is because I want to know the total quantity of the product, in this almost the product is identified by a code.

In the case that you want to add a description, how can you add it?

Super User

En ese caso usa el código DAX equivalente a:

``````Tabla cantidad por código =
SUMMARIZE ( fTable, fTable[Código], fTable[Descripción] ),
CALCULATE (
FILTER ( fTable, fTable[Código] = EARLIER ( fTable[Código] ) )
)
)
``````

Pero si lo que necesitas es visualizar las cantidades, lo único que necesitas es crear una medida tipo :

``Suma de Cantidad = SUM(fTable[Cantidad])``

y creas un visual de tabla con los campos originales de código y descripción & la medida:

In doing so, you are also helping me. Thank you!

Proud to be a Super User!

Announcements

#### 2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

#### Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

#### Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

#### Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.

Top Solution Authors
Top Kudoed Authors