Forum Discussion

bjoshi's avatar
bjoshi
Resolver I
9 years ago
Solved

Using Dax to remove duplicates before summing up a column

Hello,   This is a dax query that I have used to create a measure.  CALCULATE(SUM(Invoice[AmountDueAUD]), Invoice[Type]="ACCREC") The problem is that there are multiple rows with the same invoic...
  • Phil_Seamark's avatar
    9 years ago

    You could try and remove duplicates via the Query Editor (which has an excellent function for removing duplicates)

     

    Or in DAX you could create a summary table with just the lines you need

     

    Summary Invoice Table = SUMMARIZECOLUMNS(
                    'Invoice'[InvoiceNumber],
                    --- Columns ---
                    "AmountDueAUD",MAX('Invoice'[AmountDueAUD])
                    )