Forum Discussion
Anonymous
4 years agoNot applicable
calculate client count
Hi Community..!! I wanted to calculate count of clients that ordered more than 25000 products. Could anyone help me to solve this.? We have a client_id and quantity of products.
Anonymous
4 years agoNot applicable
Client table
OrderDetails Table
Relationship between these two tables
Anonymous
4 years agoNot applicable
HI Anonymous,
Did these tables links based on the index field? If that is the case, you can try to use the following measure formulato to achieve your requirement.
formula =
var Orderlist=
FILTER (
SUMMARIZE (
OrderDetails,
[Index],
[Product ID],
"Total Amount", SUM ( OrderDetails[Quantity] )
),
[Total Amount] > 25000
)
return
COUNTROWS (FILTER (ALLSELECTED (Client),[Index] in SELECTCOLUMNS (Orderlistm,"Index",[Index])))
If these tables are not linked based on the index field, you can replace the 'Index' part in the above table with your table relationships key field.
Regards,
Xiaoxin Sheng