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

Creating Calculating Items in SAS VA 7.3

Reply
Occasional Contributor
Posts: 14

Creating Calculating Items in SAS VA 7.3

[ Edited ]

 

Hi,

 

I m trying to create a calculated fieldfor a report. I have to create an item with a range and I using If else boolean for this. Here, i have to get the output as numeric with combination of date and numeric. i m not able to create an item with date and range between numeric where as the ouput should be a nuemeric. Please suggest..

SAS Super FREQ
Posts: 296

Re: Creating Calculating Items in SAS VA 7.3

Hello,

 

 

Can you provide some more information about the calculated expression that you want to create?

 

Do you need to compare numerics and dates?

 

It wouldn't be as simple as something like this would it?

 

IF ( 'Date'n BetweenInclusive('7MAR2017'd, '28MAR2017'd) )
RETURN 'Profit'n
ELSE .

Thanks,

Sam

Occasional Contributor
Posts: 14

Re: Creating Calculating Items in SAS VA 7.3

Yes..

IF ( 'Numeric'n BetweenInclusive('numeric', 'numeric') )
RETURN 'text string'n
ELSE .
SAS Super FREQ
Posts: 296

Re: Creating Calculating Items in SAS VA 7.3

Are you getting a message about argument types not matching?

In the VA expression syntax, . is a numeric missing value and '.' is a character missing value. If your RETURN parameter is character, then try,

IF ( 'Numeric'n BetweenInclusive('numeric', 'numeric') )
RETURN 'text string'n
ELSE '.'
Occasional Contributor
Posts: 14

Re: Creating Calculating Items in SAS VA 7.3

Yes..

Occasional Contributor
Posts: 14

Re: Creating Calculating Items in SAS VA 7.3

Can someone solve this  ??

SAS Super FREQ
Posts: 296

Re: Creating Calculating Items in SAS VA 7.3

Did you try putting quotes around the missing value for your ELSE statement?
Occasional Contributor
Posts: 14

Re: Creating Calculating Items in SAS VA 7.3

Thanks! Yes, I tried it and its working. 

SAS Super FREQ
Posts: 296

Re: Creating Calculating Items in SAS VA 7.3

Great! Thanks for following up.

Ask a Question
Discussion stats
  • 8 replies
  • 309 views
  • 0 likes
  • 2 in conversation