Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
Solved! Go to Solution.
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 He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
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 He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
'Average of number of users'
Please elaborate, as in ,what should be output in case of your given scenario.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
18 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |