BookmarkSubscribeRSS Feed
nzhmy23yimy27
Calcite | Level 5

Hi All,

 

I have a query on how to create aggregate measure of sum(_bygroup) of a variable.

Let's say I have example dataset as below:

IDSales
2345126.98
7624425.99
2345500.00
9834613.54
9834193.67
2345523.99

  And I want to create aggregate measure of total sales by ID such as below:

IDTotal SalesAggregated Measure
23451150.971,000 and above
7624425.99Below 500
9834807.21Between 500 and 1,000

 

How can I do that in SAS Visual Analytics?

1 REPLY 1
KeithM
SAS Employee

I was not able to get it to work with using the _bygroup_ aggregation.  With Viya, if you don't mind creating an aggregated table then you can accomplish this with the following steps.

 

1. Create the aggregated table.    (Select Data menu --> icon next to current table ---> New Data from aggregation of ....

I only select id and sales for the table to make it most efficient.

KeithM_0-1663794683784.png

2. Create the customer category named 'Aggregated Measure'

KeithM_1-1663794875427.png

 

3. Create a list table and include the three data items.

KeithM_2-1663795087094.png

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 1697 views
  • 0 likes
  • 2 in conversation