Forum Discussion

BishwaR's avatar
BishwaR
Helper V
5 years ago
Solved

SQL logic in DAX

I have a SQL logic count ( distinct(PurchaseOrder) | |SubOrder. How to translate it in DAX, I tried as CALCULATE( COUNT(SubOrder),DISCTINCTCOUNT(PurchaseOrder) But I dId not get the correct resutl ...
  • v-yingjl's avatar
    v-yingjl
    5 years ago

    Hi BishwaR ,

    Just use Count() directly to create measure:

    Count Suborders = COUNT('Table'[Suborder])

    Attached the sample file in the below, hopes it could help.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.