Forum Discussion
Count DAX
- 5 years ago
Anonymous
please try to create a measure
Measure = CALCULATE(DISTINCTCOUNT('Table'[Project Sub ID]),FILTER(all('Table'),'Table'[Project ID]=max('Table'[Project ID])))pls see the attachment below
Hi Anonymous
Is this the result you want ?
Through grouping 'Table'[Project Sub ID] and then count the column rows .
count = CALCULATE(COUNTA('Table'[Project Sub ID]),ALLEXCEPT('Table','Table'[Project Sub ID]))
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
Thank you for your response, sorry I should have clarified more. What I am trying to do is to count the number of subcategories in each project ID and assign that value to each Sub ID. 100 has 2 distinct categories (102A and 102B), so both 102A and 102B will have 2 as value. 103 has 3 distinct categories (103A, 103B, 103C) so 103A, 103B, 103C will have the 3 as value.
- ryan_mayu5 years agoSuper User
Anonymous
please try to create a measure
Measure = CALCULATE(DISTINCTCOUNT('Table'[Project Sub ID]),FILTER(all('Table'),'Table'[Project ID]=max('Table'[Project ID])))pls see the attachment below
- Anonymous5 years agoNot applicable
Thank you so much for help! Could you also provide me the explaination of how the measure above works so I could use it as a future reference?