Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Axiomite
Resolver II
Resolver II

Calculate where total of distinctcount based on condition

Hi there,

I would like to to calculate the total of repeats/returning customers for a certian period. 

So my first measure for the below "Distinct email Count", I use = CALCULATE(DISTINCTCOUNT(Table[Column]
Then a simple = 
IF([Distinct email Count] > 1, "Returning", "Not")

 

How will I be able to get the total of value for Returning and for Not? 

Sample.jpg

 

I know there are a couple of articles on New, Lost Customers but just looking for a simplified version of identifying returning customers for a sanity check. 

Any ideas? 

 

Kind regards

 

 

1 ACCEPTED SOLUTION

@amitchandak - thanks for your reply. I might not have been clear with question, however, I managed to get it working with 

SUMX(VALUES(Sales[Customer_email]), IF(Measures[Returning Customer] = "Returning", 1, 0)). 
 
Thanks and regards

View solution in original post

4 REPLIES 4
v-henryk-mstf
Community Support
Community Support

Hi @Axiomite ,

 

If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.😊


Best Regards,
Henry

amitchandak
Super User
Super User

@Axiomite ,

Returning = countx( filter(summarize(Table, Table[Year], Table[Month], Table[email], "_1", CALCULATE(DISTINCTCOUNT(Table[Column] )) ) , [_1] >1) ,[email] )

 

not = countx( filter(summarize(Table, Table[Year], Table[Month], Table[email], "_1", CALCULATE(DISTINCTCOUNT(Table[Column] )) ) , [_1] <=1 ) ,[email] )

@amitchandak - thanks for your reply. I might not have been clear with question, however, I managed to get it working with 

SUMX(VALUES(Sales[Customer_email]), IF(Measures[Returning Customer] = "Returning", 1, 0)). 
 
Thanks and regards

Kudos to you !!

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.