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

How do I create a cumulative SUM based on a CATEGORY and not a DATE? | SAS VA

Reply
Occasional Contributor
Posts: 13

How do I create a cumulative SUM based on a CATEGORY and not a DATE? | SAS VA

Hi there,

 

 

 

I would like to create a cumulative sum (running total) based on a category (and not a date) in SAS VA:

 

Example:

 

 

Capture.JPG

 

Thank you in advance for your help.

 

SAS Super FREQ
Posts: 275

Re: How do I create a cumulative SUM based on a CATEGORY and not a DATE? | SAS VA

Hello,

You can enable totals (but not running totals) in the Properties tab for a list table or a crosstab. Crosstabs also can have group subtotals.

I don't think that it is possible to create a running total like this in the expression editor in Visual Analytics, but you could calculate the running total as part of your data query.
Occasional Contributor
Posts: 13

Re: How do I create a cumulative SUM based on a CATEGORY and not a DATE? | SAS VA

Thanks a lot for your reply. That was helpful.

 

Regards,

Sarthak

Community Manager
Posts: 422

Re: How do I create a cumulative SUM based on a CATEGORY and not a DATE? | SAS VA

Hi sarthak89,

 

I'm glad you found Sam's response helpful! Feel free to "accept as solution" or "like" his reply. This helps out other community members who may run into the same issue.

 

Thanks!

Anna

Regular Learner
Posts: 1

Re: How do I create a cumulative SUM based on a CATEGORY and not a DATE? | SAS VA

Hi, Sam_SAS,

 

I have same this issue, so the solution for "calculate the running total as part of your data query",

you can show how to this solution,

 

 

SAS Super FREQ
Posts: 275

Re: How do I create a cumulative SUM based on a CATEGORY and not a DATE? | SAS VA

Hello,

 

If you have the appropriate permissions in SAS VA, then you can access the data builder. On the home page you will see a "Data preparation" link.

 

In the data builder, you can edit the SQL expressions for your columns or edit the SAS data step for your query.

 

See https://support.sas.com/documentation/cdl/en/vaug/68648/HTML/default/viewer.htm#p018nyo71g4dpzn1nrr0...

 

I am not an expert in this area so I am not sure exactly what expression you would want to build to calculate your running total.

 

I hope that helps,

Sam

Post a Question
Discussion Stats
  • 5 replies
  • 1103 views
  • 1 like
  • 4 in conversation