Forum Discussion
How to identify duplicates - same amount and date
- 4 years ago
ssbagley looked into it and the measure is working as desired.
You need to put all the axis on Don't Summarize
Also, don't use date hierarchy and do the following
ssbagley you can utilize a measure like this
coutOfSubmission =
CALCULATE (
COUNT ( 'Table'[Amount] ),
ALLEXCEPT (
'Table',
'Table'[Employee ID],
'Table'[Expense Date],
'Table'[Amount]
),
FILTER ( VALUES ( 'Table'[Amount] ), 'Table'[Amount] <> 0 )
)
It counts the amount by ID,Date,Amount Partition for any non-zero Amount
- ssbagley4 years ago
Helper III
But this only "counts", right? I need to identify lines where the same date and amount appear more than once (duplicate submissions). For example, if Employee 1 submitted $5 three times on 10/04/2019 - that would flag. But if Employee 2 only submitted $5 one time on 10/5/2019, that would not flag.
- smpa014 years ago
Community Champion
ssbagley if you want to do it through measure, you need an index column
coutOfSubmission = VAR _count = CALCULATE ( COUNT ( 'Table'[Amount] ), ALLEXCEPT ( 'Table', 'Table'[Employee ID], 'Table'[Expense Date], 'Table'[Amount] ), FILTER ( VALUES ( 'Table'[Amount] ), 'Table'[Amount] <> 0 ) ) RETURN IF ( _count > 1, "Duplicate Submission Exists", "No Duplicate Submission Exists" )The same can be used for calcukated column without requiring an index column
Please find attached