BookmarkSubscribeRSS Feed
znhnm
Quartz | Level 8

Hello,

 

I am trying to create an advanced filter on VA. The condition looks like this:

IF ('Frequency (1)'n = Frequency)
    RETURN (Frequency)
ELSE ('Frequency (1)'n)

However, I get this: Expected: Boolean or Aggregated condition Found: Numeric

How can I solve this?

Thank you! 

Regards,
1 REPLY 1
Sam_SAS
SAS Employee

Hello,

 

A filter expression will always return a boolean (True/False), which is how the logic of the filter works.

 

Your expression would work as a calculated item.

 

Alternatively, you can return a boolean for a filter by using an expression like this:

 

IF ('Frequency (1)'n = Frequency)
    RETURN (1=1)
ELSE (1=0)
 
Of course, this would be much more simply expressed as:
('Frequency (1)'n = Frequency)
 
I don't know if it is possible to enter "True" or "False" directly in the expression editor, so you can put a correct or incorrect math equation instead.
 
The equation above filter out all values of Frequency (1) that are not equal to Frequency.
 
Thanks,
Sam

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 288 views
  • 0 likes
  • 2 in conversation