Forum Discussion
Anonymous
5 years agoNot applicable
How to Take Count and Distinct Count Dependent on Column Value
In my data set I need to take a count or distinct count of a unqiue ID depending on a column value. In the below example, if the Value is A or C I need to take a count of the Unique ID and if the Va...
- Anonymous5 years ago
Hi Anonymous ,
I took what you provided and was able to tweak it a little to get what I needed. Here is where I ended up at when creating the measure. Thanks for the assistance.
Count =SWITCH( SELECTEDVALUE('Table'[Value]),"A", COUNT('Table'[Unique ID]),"B", DISTINCTCOUNT( 'Table'[Unique ID]),"C", COUNT('Table'[Unique ID]))Regards,Eric
Anonymous
5 years agoNot applicable
Hi Anonymous
Use matrix chart instead of table chart
Or
Create is as a column instead of measure.
- Anonymous5 years agoNot applicable
Hi Anonymous ,
I took what you provided and was able to tweak it a little to get what I needed. Here is where I ended up at when creating the measure. Thanks for the assistance.
Count =SWITCH( SELECTEDVALUE('Table'[Value]),"A", COUNT('Table'[Unique ID]),"B", DISTINCTCOUNT( 'Table'[Unique ID]),"C", COUNT('Table'[Unique ID]))Regards,Eric