BookmarkSubscribeRSS Feed
KarthikB
Calcite | Level 5

Dear Experts,

Could you please advice me on how to create a Average on top of count of a field.

To be specific, I have a category named "ID" (character datatype) and i need to calculate the average of the count of ID for a group called "Dept"

Thanks in advance

Karthik

2 REPLIES 2
LinusH
Tourmaline | Level 20

I understand count:

select dept, count(distinct ID) as cnt

     from have

     group by dept

;

But average, of what...? Perhaps some sample input and desired output?

Data never sleeps
KarthikB
Calcite | Level 5

Thanks for the reply Linus,

Firstly, I dont have access to Data Preparation. Hence, I need to complete my requirement at the VA Report itself.

The Actual Requirement is: I want to set the Target as "Average of the bar value" in the "Targeted Bar Chart". The bar shows the Count of ID as Measure. and the group is "Dept" column.

Could you please suggest me on how to set the target with the "Average" . Thanks

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 864 views
  • 0 likes
  • 2 in conversation