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.
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.
Thanks in advance,
Kind Regards,
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:
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
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
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
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!
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.