Forum Discussion
prpaz
2 years agoRegular Visitor
Calculate distinct items by classification
Hello friends, I have the following question about creating a measure. I have two related tables, items and classification. I need a measure that calculates the number of distinct items that have...
- Anonymous2 years ago
Hi prpaz ,
We can create measures.
Flag = var _table=SUMMARIZE('classification','classification'[item],'classification'[classification]) var _count=COUNTROWS(FILTER(_table,[item] in VALUES('classification'[item]))) RETURN IF(_count=1,1,0)count = SUMX(VALUES('classification'[item]),[Flag])Then the result is as follows, the number of items that have only one type of classification is 7.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
prpaz
2 years agoRegular Visitor
Explaining in an easier way, I have several items that have several classifications. But I need the number of items that only have one distinct classification. Example: The number of distinct items that are allocated to the orange classification.