Forum Discussion

randyvdr's avatar
randyvdr
Frequent Visitor
1 year ago
Solved

total Value with repeated rows

Hello Communitiy,   Would you be so gentle to help me with the following query.   I have the next example set of data:   Region Country Category ID Sales order ID Total Sales EUROPE ...
  • vicky_'s avatar
    1 year ago

    Hi, 

     

    Please try the following:

    Sales calc = SUMX(SUMMARIZE('Table', 'Table'[Sales order ID], 'Table'[Total Sales]), 'Table'[Total Sales])

    Note - for this to work, i assume that each combination of sales order ID and total sales is unique. If you end up with a row that's like:

    Region Country Category ID Sales order ID Total Sales
    EUROPE Italy A E10  $                    100.00
    EUROPE Italy A E10  $                    200.00

    then the result in your table will show $300. If this is not the result that you expect, then you will need to provide more details on how you expect to handle this case.