Forum Discussion
gowrishankar65
7 years agoHelper I
DAX Calculation unique Count
Hi Team, I am trying to create report for Retail Analytics. I have a table with Columns - Phone Number, Invoice Date which has duplicates. With Invoice Date I am getting No. of visits (Calc...
- 7 years ago
Try this one
Measure = COUNTX ( FILTER ( SUMMARIZE ( ALLSELECTED ( TableName ), TableName[Phone Number], TableName[Invoice Date] ), [Fraud or Valid] = "Fraud" ), 1 )
Greg_Deckler
7 years agoCommunity Champion
I'm not sure I am following this, so are you saying that you only want the 123456 phone number counted once as a fraud instead of multiple times? If that is the case, then perhaps you could take the DISTINCTCOUNT of your phone numbers and subtract that from your COUNT of phone numbers and that would give you how many duplicates you have and then just subtract that from your fraud count?
Sean
7 years agoCommunity Champion
This Measure should work!
Fraud Number =
CALCULATE (
DISTINCTCOUNT ( CustomerInvoice[Phone Number] ),
FILTER ( CustomerInvoice, [Fraud or Valid] = "Fraud" )
)Good Luck! :smileyhappy: