Forum Discussion

Johan-MTM's avatar
Johan-MTM
Helper III
3 years ago
Solved

Is this correct?

Hi!

 

I want to count "id" from the table "public borrower" but only those that are borrower_deleted=FALSE. 

 

 

Number of Borrowers = calculate(DISTINCTCOUNT('public borrower'[id]),'public borrower'[borrower_deleted]=FALSE())

Thanks
 
Ps Also - the language used here is called Dax or?

/johan 

 

5 Replies

  • Arul's avatar
    Arul
    Super User

    Johan-MTM ,

    Do you need distinct id or total count of borrower_deleted?

    Thanks,

    Arul

  • Anonymous's avatar
    Anonymous
    Not applicable

    Number of Borrowers = calculate(DISTINCTCOUNT('public borrower'[id]), filter(public borrower,'public borrower'[borrower_deleted]=FALSE())

    • Johan-MTM's avatar
      Johan-MTM
      Helper III

      Thanks Arul 
      There should not be any duplicates so then it should be ok. And I wrote the function corret so only ID with borrowe_deleted=FLASE will be counted right?

       

      • Arul's avatar
        Arul
        Super User

        Johan-MTM ,

        Yes, It should count the correct number of id's and should be give you the correct numbers.

        Thanks,

        Arul