Forum Discussion
Mr_Glister
Advocate II
2 years agoDAX distinct count with filter condition
I have an issue with something that I thought would be easy. Below is a sample of my data. I would want to create a DAX measure that counts the number of companies (distinct!) that have >= 10 It...
- Anonymous2 years ago
Hi Mr_Glister ,
I made simple samples and you can check the results below:
Total Count = var _t = ADDCOLUMNS('Table',"total",SUMX(FILTER(ALL('Table'),[Week]=EARLIER([Week])&&[Company]=EARLIER([Company])),[Item sold])) RETURN CALCULATE(DISTINCTCOUNT([Company]),FILTER(_t,[Total]>=10))An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Daniel29195
Community Champion
2 years agoitem sold = SUM(table23[ Item sold])
Count above 10 =
var datasource =
FILTER(
ADDCOLUMNS(
values(Table23[Company]),
"sold" , [item sold]
),
[sold] >=10
)
return
COUNTROWS(datasource)
let me know if you have any problem implementing it .
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. I would appreciate hitting that kudos 👍🫡
- Mr_Glister2 years ago
Advocate II
Hi Daniel,
is this supposed to be Sum() of item sold?
"sold" , [item sold]- Daniel291952 years ago
Community Champion
sorry for the late reply . it seems that there is a problem with the platform. i m getting no notifications .
correct.
this is sum(item sold)
let me know if you need any help .
If my response has successfully addressed your issue kindly consider marking it as the accepted solution! This will help others find it quickly. I would appreciate hitting that kudos button 👍🤠