The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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.
User | Count |
---|---|
65 | |
62 | |
55 | |
53 | |
28 |
User | Count |
---|---|
181 | |
82 | |
67 | |
47 | |
44 |