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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Unique count of customers

Hi Community

 

I'm trying to figure out how to measure the amount of unique customers thats ordered in a time period. For example i have a table with orders and a related table that shows which customer placed the order.

ORDERDATEORDERNUMBER
3-12-20201001
3-12-20201002
3-12-20201003
3-12-20201004
3-12-20201005
3-12-20201006
  
  
ORDERNUMBERCUSTOMER
1001C401
1002C402
1003C401
1004C403
1005C405
1006C406

 

In my example the answere should be 5 active customers.

 

Any ideas?

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, you can create a measure as follows.

Measure = CALCULATE(DISTINCTCOUNT(order_number[CUSTOMER]),ALLEXCEPT(order_date,order_date[ORDERDATE]))

 

Result:

v-yuaj-msft_0-1607301308307.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, you can create a measure as follows.

Measure = CALCULATE(DISTINCTCOUNT(order_number[CUSTOMER]),ALLEXCEPT(order_date,order_date[ORDERDATE]))

 

Result:

v-yuaj-msft_0-1607301308307.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , if the second table is on One side of mant to one relation. Then you can have

 

Calculate(distinctcount(Table2[customer]), not(isblank(Table[ORDERNUMBER])))

 

In case of mant to many I am not sure.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.