Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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

  • az38's avatar
    az38
    Community Champion

    Anonymous 

    maybe the isue in row context activated with CALCULATE() its unclear without data exampletry like

    CALCULATE(COUNT(table[field]),ALL(table))
  • Anonymous's avatar
    Anonymous
    Not 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.

  • CALCULATE(COUNT(table[field])) and CALCULATE(COUNTrows(table)) is same ?

    If so this might be a unique column

     

  • v-lid-msft's avatar
    v-lid-msft
    Community 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,