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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 58 | |
| 45 | |
| 42 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 172 | |
| 107 | |
| 92 | |
| 54 | |
| 46 |