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 Super FREQ

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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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