Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to filter customer by if they purchase on multiple dates?


How to filter customer by if they purchase on multiple dates?

Author
Message
captainlaw
captainlaw
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
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.
captainlaw
captainlaw
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 26
Anyone could help?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search