Hi,
I want to show blank values for tables or graphs if the text input is blank.
I get the same error you do when I try this on 7.5.
I think I have a workaround that might help.
1. Edit your parameter and set the current value to be something crazy like 01JAN1900.
2. Ensure the text input has a filter link to the list table on the Actions pane.
3. Make an advanced filter on the list table. Set the expression to select where the parameter value is NOT the current value from step 1 AND not missing. For me, this expression looked like: ( 'Parameter 1'p NotIn ('1JAN1900'd) ) AND ( 'Parameter 1'p NotMissing )
4. Do not include a calculated item based on the parameter in your list table. This will cause the "an error occurred" when the parameter value is not set.
In the screenshot below, the table is filtered when you enter a text value.
When no value is specified, the table is empty and the warning icon says "The filter resulted in an empty set of data".
That is probably the closest we can get to what you want in 7.5.
Sam
Hello,
I'm not completely sure why you would want to display missing values for the date.
If you assign a parameter to the text input, and you create a calculated item based on that parameter, I think that it would behave in the way that you want.
Note that creating date parameters is annoying and you must specify a minimum and maximum value. You can just put something like 01JAN1930 and 01JAN2100 if you want.
Let us know if that helps,
Sam
I tried it but it doesn't work, these are the steps i did:
created the parameter:
then assigned it to the text input:
then created a calculated item based on this parameter:
then i added this calculated item to the table:
and now when i remove the date in text input the table gives error:
my point was when the user open the page there is no date shown in text input and table is blank
I want the user see this when opening the page without any data
because the steps which creating parameter the assign to cal item will make the user see a date selected when opening the page
Hello,
It works for me on Viya 4. From your screen captures, it looks like you have done everything correctly, although it appears you did not set up a filter action between the text input and the table.
Your screen captures show "An error occurred", and I wonder what that error is.
To get a completely empty table when the parameter is not set, create an advanced filter on the Filters pane using the IsSet operator:
( 'Parameter 2'p IsSet )
I'm not sure if that will help until we figure out why you are getting this error, however.
Sam
The filter would go on the table. But if you don't have the IsSet function I think you must have a very old version of Visual Analytics.
Are you on 8.1 or older?
I get the same error you do when I try this on 7.5.
I think I have a workaround that might help.
1. Edit your parameter and set the current value to be something crazy like 01JAN1900.
2. Ensure the text input has a filter link to the list table on the Actions pane.
3. Make an advanced filter on the list table. Set the expression to select where the parameter value is NOT the current value from step 1 AND not missing. For me, this expression looked like: ( 'Parameter 1'p NotIn ('1JAN1900'd) ) AND ( 'Parameter 1'p NotMissing )
4. Do not include a calculated item based on the parameter in your list table. This will cause the "an error occurred" when the parameter value is not set.
In the screenshot below, the table is filtered when you enter a text value.
When no value is specified, the table is empty and the warning icon says "The filter resulted in an empty set of data".
That is probably the closest we can get to what you want in 7.5.
Sam
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.