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-2024.png

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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