Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to filter customer by if they purchase on multiple dates? Expand / Collapse
Author
Message
Posted Saturday, November 23, 2013 2:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, January 08, 2014 1:35 PM
Points: 2, Visits: 26
Hello,

I'm trying to figure out how to find "Unique Customer" who are classified as "Repeat Customer".

"Unique Customer" is correct: DISTINCTCOUNT(TableA[customer])

"Repeat Customer" Definition: Customers who have more than one records from distinct SalesDateID

Here's the DAX I have, but is not doing what I described above. It is returning the same value as Unique Customer. I logic is find the unique customer first, then use FILTER function to return customers who have distinct count of SalesDateID > 1. Let me know what could be wrong below? Or if you have better ways of constructing the DAX.

CALCULATE(DISTINCTCOUNT(TableA[customer]), FILTER(LAW,DISTINCTCOUNT(TableA[salesdateid])>1))

Your help is much appreciated.
Post #1517039
Posted Tuesday, November 26, 2013 11:22 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, January 08, 2014 1:35 PM
Points: 2, Visits: 26
Anyone could help?
Post #1517773
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse