Forum Discussion
How to identify average when the column has text datatype?
Hi All,
I have a column which has 'user name' and it's datatype is 'text'. Currently I am showing the data in card visual which shows distinctcount of username.
However, I would like to show 'Average of number of users'. Since it is in text datatype, could you please advice on how to write the measure to achieve this scenario?
E.g. data:
| Username |
| abc |
| def |
| ghi |
- Anonymous2 years ago
Hi Arioli_Chezhian ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:Create a measure
Distintcount = VAR _a = CALCULATE( DISTINCTCOUNT('Table'[Username]), ALL('Table') ) RETURN CALCULATE( COUNT('Table'[Username])/_a )Final output
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
3 Replies
- AnonymousNot applicable
Hi Arioli_Chezhian ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:Create a measure
Distintcount = VAR _a = CALCULATE( DISTINCTCOUNT('Table'[Username]), ALL('Table') ) RETURN CALCULATE( COUNT('Table'[Username])/_a )Final output
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Pawasthi3292Frequent Visitor
'Average of number of users'
Please elaborate, as in ,what should be output in case of your given scenario.- Arioli_Chezhian
Helper II
Pawasthi3292 - As like average of distinctcount of number of users