BookmarkSubscribeRSS Feed
fj181
Fluorite | Level 6

Hi all,

 

I have a request to present a Line Char with different time dimensions, and give the possibility to user to choose between them.

Anyone have any suggestion?

I try to create a custom graph with two line charts, with one share role to measure between them, and category role independent. SASCVA.PNG

 And my intend is to filter the graph just showing one time dimension when the user choose between dimension.

I tried to use a if then statement with a parameter but VA did't accept variable in date format.

SASCVA_2.PNG

 

Thanks in advance,

Kind Regards,

 

6 REPLIES 6
Sam_SAS
SAS Employee

Hello,

 

I am able to get this working on a VA 8.5 deployment using the same approach you are using.

 

My expression looks like this:

expression.gif

 

When you created your parameter, did you select the Multiple values box?

 

Also, try changing the list control in your report to a button bar or drop-down list.

 

Sam

fj181
Fluorite | Level 6
Hi Sam,

I tried what u said and still could't make it. 😞

I'm working with VA 7.5.
Sam_SAS
SAS Employee

I was able to get the same expression working on a 7.5 deployment. Maybe Fredrik is right about the date format being an issue? To troubleshoot, you might want to try using some different data.

 

Sam

FredrikE
Rhodochrosite | Level 12
I think the date format is the problem.
Is it possible to create two text objects containing day/week and then use them and the format string?
//Fredrik
fj181
Fluorite | Level 6
Hi Fredrik,

I had the same thought the error pointed out to date format 😞

Can you explain me your idea?
"Is it possible to create two text objects containing day/week and then use them and the format string?"

Thanks in advance
FredrikE
Rhodochrosite | Level 12

Sorry for late answer, you might already found a fix, but anyways:

 

Create a textvariable for weekday:

IF ( DayOfWeek('date'n) = 1 )
RETURN 'Sunday'
ELSE (
IF ( DayOfWeek('date'n) = 2 )
RETURN 'Monday'
ELSE (
IF ( DayOfWeek('date'n) = 3 )
RETURN 'Tuesday'
ELSE (
IF ( DayOfWeek('date'n) = 4 )
RETURN 'Wednesday'
ELSE (
IF ( DayOfWeek('date'n) = 5 )
RETURN 'Thursday'
ELSE (
IF ( DayOfWeek('date'n) = 6 )
RETURN 'Friday'
ELSE 'Saturday' ) ) ) ) )

 

and one for date:

Format('date'n[Raw], 'YYMMDD8.')

 

And use them instead of the date variables, should work 🙂

 

//Fredrik

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 6 replies
  • 1646 views
  • 3 likes
  • 3 in conversation