BookmarkSubscribeRSS Feed
KrisNori
Obsidian | Level 7

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

5 REPLIES 5
MichelleHomes
Meteorite | Level 14

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

 

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
DaveShea
Lapis Lazuli | Level 10
Hi Michelle,

Thanks for the great tip about Derived Items.

Downunder Dave.
gabras
Pyrite | Level 9

Hi @MichelleHomes

is there a way to create an aggregated variable, such as the one you suggested in this post, and then use it's distinct value in order to create other report?

For example i want to create a report that counts distinct customers that made that amount of count.

MichelleHomes
Meteorite | Level 14

It seems that what you are trying to achieve @gabras is now available in the newly released SAS Visual Analytics 8.3 on SAS Viya 3.4. See documentation http://documentation.sas.com/?cdcId=vacdc&cdcVersion=8.3&docsetId=vawn&docsetTarget=n1ehcc5pjl4yrtn1... and the Enhanced Data Pane section. 

 

If you are using any other release you’ll need to create the aggregated value as a query or outside VA and have the data source available for the new report.

 

Kind Regards,

Michelle

//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
gabras
Pyrite | Level 9

It seems to me that SAS VA doesn't support a dinamic report except for SAS Viya.

 

But if i use a data query in the Data Preparation Panel is it possible to treat the query builder as a stored process?

Let's say i create the query. is it possible to associate a from_data and to_data prompts to trigger the execution of the quey in order to create the report?

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
  • 5 replies
  • 3558 views
  • 2 likes
  • 4 in conversation