Forum Discussion

pmacfarlane's avatar
pmacfarlane
Regular Visitor
3 years ago

Group by unique identifier

Hi,

 

Seems like a really simple task, but I've tried multiple iterations of DAX and can't get exactly what I need.

 

I have a table similar to the below where i need to be able to create a calculated column to count the total number of policies by customer.  For example, in the person ID highlighted below, they have 2 policy numbers attributed to them.

 

Any help would be much appreciated.  Thanks

 

 

4 Replies

  • Arul's avatar
    Arul
    Super User

    pmacfarlane ,

    just put those 2 columns in table visual and right click on pol_policy_ column and do a count in the list. (refer the image attached)

    Thanks,

    Arul

  • pmacfarlane's avatar
    pmacfarlane
    Regular Visitor

    Hi,

     

    I need this as a calculated column.  On the below shows what I've tried where it works for the majority, but unfortunately not all.  See highlighted

     

     

    • pmacfarlane's avatar
      pmacfarlane
      Regular Visitor

      I need a calculated column that woun't give me the issue I've mentioned below where it's miscounting the policies.  thanks