Forum Discussion
count function returns distinct count
CALCULATE(COUNT(table[field]),USERELATIONSHIP(table[datefield],calendar[datefield))
why would this return a distinct count ?
I tried removing userelationship - same results.
5 Replies
- parry2kSuper User
Anonymous it is very hard to figure out what is going on based on the information you provided, you need to provide sample data, relationship information.
Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 - az38Community Champion
Anonymous
maybe the isue in row context activated with CALCULATE() its unclear without data exampletry like
CALCULATE(COUNT(table[field]),ALL(table)) - AnonymousNot applicable
The COUNT function returns the COUNT, not the distinct. If you have used a USERELATIONSHIP it might change the behaviour depending on the context but it should not.
If the COUNT still return a distinct even without the USERELATIONSHIP that means that in the context of where you calculate that formula, the rows are DISTINCT in some way.
- amitchandakSuper User
CALCULATE(COUNT(table[field])) and CALCULATE(COUNTrows(table)) is same ?
If so this might be a unique column
- v-lid-msftCommunity Support
Hi Anonymous ,
Does this issue have been resolved?Could you please provide more details about it If it still not be resolved? Please don't contain any Confidential Information or Real data in your reply.
Best regards,