cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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?

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
Resolver II

@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
4 REPLIES 4
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.

Best Regards,
Henry

Super User

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] )

Resolver II

@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
Super User

Kudos to you !!