Forum Discussion
Syndicate_Admin
2 years agoAdministrator
ADDING ONE WITH CONDITIONS
Good morning I want to add the "UNITS" column according to product, color and size per agent. For example, Luis, 3 units, but it doubles me in this case to 6 units by the supplier. Another e...
- 2 years ago
If you want to calculate the sum of units by agent and supplier, try this:
CALCULATE ( SUM ( 'table'[UNIDADES] ), ALLEXCEPT ( 'table', 'table'[AGENTE], 'table'[PROVEEDOR] ) ) - Anonymous2 years ago
Hi Syndicate_Admin ,
Based on my testing, please try the following methods:
1.Create the sample table.
2.Create the calculated table.
Unique = SUMMARIZE( 'Table', 'Table'[AGENT], 'Table'[PRODUCT], 'Table'[COLOR], 'Table'[SIZE], "UniqueUnits", MAX('Table'[UNIDADES]) )3.Create the relationship between two tables.
4.Create the new Units column.
Units = CALCULATE( SUM('Unique'[UniqueUnits]), ALLEXCEPT('Unique', 'Unique'[AGENT]) )5.The result is shown below.
Best Regards,
Wisdom Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
danextian
2 years agoSuper User
If you want to calculate the sum of units by agent and supplier, try this:
CALCULATE (
SUM ( 'table'[UNIDADES] ),
ALLEXCEPT ( 'table', 'table'[AGENTE], 'table'[PROVEEDOR] )
)