Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

count values using a group

Occasional Contributor
Posts: 17

count values using a group

Hi there,


I am using SAS VA 7.3.

How can I get the value in a variable in SAS VA Report Designer that is equivalent to the count produced by below query ?


Select customer_type, count( distinct customer_id) 

from table 

group by customer_type;


Thanks in advance.


Trusted Advisor
Posts: 1,289

Re: count values using a group

You can create a derived item on your customer_id category using the Creating Derived Items technique described in the SAS Visual Analytics User Guide: Creating Derived Items


To get a table of each customer_type by the distinct customer_id use both data items in a table object and you'll have the listing you desire. If you prefer a different visual then use customer_type and your derived item in that.


Kind Regards,



Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation