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

Calculating Product for a period/selected observations of a variable

Reply
Contributor
Posts: 28

Calculating Product for a period/selected observations of a variable

I WANT:

 

I want the report users to have the capability to calculate the Product of obs in Variable VALUE based on the MONTH_END_DATE selection.

 

I HAVE:

 

Let's say I have a slider with MONTH_END_DATE value in it which gives a user the flxeiblity to choose a period. Once they have choosen a begining and ending period of their choice, I want to display the product of all observations for variable VALUE. 

For example: User select JAN2015-MAR2015 in the slider, I want to display Product of the 3 obs in that period (0.988*1.035*.995) 

1.0174

 

It can be done very easily in Excel, Is there a way to do it in VA. 

 

<see the attachment>  


Capture1.PNG
SAS Super FREQ
Posts: 289

Re: Calculating Product for a period/selected observations of a variable

Hello,

 

If I understand correctly, you want basically want an aggregation type that multiplies the values together in the same way that the SUM aggregation adds the values together.

 

Is that right?

 

I don't think there is a way to do this currently. Can you explain the scenario where this type of calculation is needed?

 

Thanks,

Sam

Contributor
Posts: 28

Re: Calculating Product for a period/selected observations of a variable

Yes. I have monthly return for last 10 years. I have to calculate compunded return for a selected time period in the date slider. 

SAS Super FREQ
Posts: 289

Re: Calculating Product for a period/selected observations of a variable

Thanks for your reply.

I don't know much about such things, but if I understand correctly this is a banking / finance application?

Thanks,
Sam
Contributor
Posts: 28

Re: Calculating Product for a period/selected observations of a variable

Yes. It is related to finance.

SAS Super FREQ
Posts: 289

Re: Calculating Product for a period/selected observations of a variable

Ah, thanks.

If you could submit this as an idea here:
https://communities.sas.com/t5/SASware-Ballot-Ideas/idb-p/sas_ideas/label-name/sas%20visual%20analyt...

It would help our product management evaluate the feature for a future release.

Thanks,
Sam
Contributor
Posts: 28

Re: Calculating Product for a period/selected observations of a variable

Thanks @Sam_SAS. I will submit this idea. Is there any way to replicate this in Base SAS. 

SAS Super FREQ
Posts: 289

Re: Calculating Product for a period/selected observations of a variable

Great! That really helps us. If you could give some more details about your business needs for this feature it helps our team evaluate whether this feature should be prioritized.

About Base SAS, I would expect that it is possible do this in Base SAS but I couldn't say offhand how to do it.
Contributor
Posts: 28

Re: Calculating Product for a period/selected observations of a variable

@Sam_SAS I was able to resolve it using Base SAS. I have updated the idea for future product developements. If you are interetsed I can walk you through my requirement and show you how I resolved it.

SAS Super FREQ
Posts: 289

Re: Calculating Product for a period/selected observations of a variable

That is good to hear!

 

I looked for your idea but I can't seem to find it. Can you post a link?

 

It would be best for us if you could post your requirements and your workaround there.

 

Thanks,

Sam

Contributor
Posts: 28

Re: Calculating Product for a period/selected observations of a variable

[ Edited ]
SAS Super FREQ
Posts: 289

Re: Calculating Product for a period/selected observations of a variable

Thanks, I can see it now and I am also able to find it when I browse the VA ideas.
Ask a Question
Discussion stats
  • 11 replies
  • 297 views
  • 0 likes
  • 2 in conversation