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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.