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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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