Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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.
ORDERDATE | ORDERNUMBER |
3-12-2020 | 1001 |
3-12-2020 | 1002 |
3-12-2020 | 1003 |
3-12-2020 | 1004 |
3-12-2020 | 1005 |
3-12-2020 | 1006 |
ORDERNUMBER | CUSTOMER |
1001 | C401 |
1002 | C402 |
1003 | C401 |
1004 | C403 |
1005 | C405 |
1006 | C406 |
In my example the answere should be 5 active customers.
Any ideas?
Thanks!
Solved! Go to Solution.
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:
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.
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:
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.
@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.