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

count values using a group

Reply
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.

Kris

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,

Michelle

 

Ask a Question
Discussion stats
  • 1 reply
  • 147 views
  • 0 likes
  • 2 in conversation