Hello,
I have in SAS VA an aggregated measure as follows:
IF ( ( Sum [_ByGroup_] ('Lf. Monat'n) <> 0 ) AND ( Sum [_ByGroup_] ('UMS'n) <> 0 ) )
RETURN ( Sum [_ByGroup_] ('Lf. Monat'n) / Sum [_ByGroup_] ('UMS'n) )
ELSE 0
This formula calculates now on all members of a category called POSITION. I want to limit now the calculation on all positions except the one calle "FAKT_STD". So it should look similar to this one:
IF ( ( Sum [_ByGroup_] ('Lf. Monat'n) <> 0 ) AND ( Sum [_ByGroup_] ('UMS'n) <> 0 )
AND ( POSITION<> 'FAKT_STD' )
)
RETURN ( Sum [_ByGroup_] ('Lf. Monat'n) / Sum [_ByGroup_] ('UMS'n) )
ELSE 0
Unfortunately this expression is not accepted by the system.
Does anybody know how the expression should look like?
Thx
Robert
Can you tell us which version of Visual Analytics you are using?
When you say "not accepted," is there an error message or a warning in the Expression dialog box? If yes, what is it? If not, then can you provide more details about "not accepted."
-------------------------------------------------------------------------
Four tips to remember when you contact SAS Technical Support
Tricks for SAS Visual Analytics Report Builders
SAS Visual Analytics Learning Center
Hi Madelyn,
We are using VA 7.3.
The meesage that I get is the following:
The german message ranslate to "Arguments should be of same type. One type is numeric the other alphanumeric"
Thx
Robert
The message is coming from the expression Position <> "FAKT_STD". To get this to work, turn that into a numeric expression by doing the following:
1. Create a numeric calculated data item called Position Flag.
2. In the expression for Position Flag make it look like: If Position <> "FAKT_STD" return 1 else 0
3. Modify your % v.UMS.(Lf.M) calculation and replace (Position <> "FAKT_STD") with "Position Flag"n >= 1
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.