Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

how to use the same filter for multiple charts on same section

Accepted Solution Solved
Reply
Contributor
Posts: 59
Accepted Solution

how to use the same filter for multiple charts on same section

i have a drop down with Year values in it. (ie. 2014 2015 2016)

i have two charts on the same tab.

 

i want the first chart filtered by the value in the drop down (ie. 2016)

i want the 2nd chart filtered by the value -1 in the drop down (ie 2016 -1=2015)

 

The value in the dropdown is character and a category.

 

?


Accepted Solutions
Solution
‎06-13-2016 09:11 AM
Occasional Contributor
Posts: 14

Re: how to use the same filter for multiple charts on same section

> convert charcter to numeric in filter only using parse.

>In below year is in character i coverted it in to numeric

 

IF ( 'year Parameter'p NotMissing )
RETURN ( Parse('year'n, 'NUMX4.') = Parse('year Parameter'p, 'NUMX4.') - 1 )
ELSE ( 'year'n NotMissing )

View solution in original post


All Replies
Regular Contributor
Posts: 199

Re: how to use the same filter for multiple charts on same section

Hi,

 

Can you please share the two charts info like roles

 

 

 

 

Thanks & Regards,

Teja Surapaneni

 

 

 

 

 

Occasional Contributor
Posts: 14

Re: how to use the same filter for multiple charts on same section

@mhamlett

 

> Using paramaters it is possible but for that create dropdown list in the canvas only instead of section filter

>Create parameter from Dropdown

>Filter two tabs using filter

>ex-   if year_paramteter notmissing

            then  year = year_parameter

            else

              year notmissing

> Year = your year field    and  year_parameter = parameter which we created  from dropdown filter   

>Use above logic for TAB1 and (Year_parameter -1) for TAB 2

 

Hope it will help you

Contributor
Posts: 59

Re: how to use the same filter for multiple charts on same section

Posted in reply to vivek_sas

how do i do math on a parameter.  says type mismatch because the year is a category not a measure.

seems i need to convert the year to a number to subtract 1 from it.

SAS Super FREQ
Posts: 296

Re: how to use the same filter for multiple charts on same section

The Year() operator will return the year from a date value as a number.

Solution
‎06-13-2016 09:11 AM
Occasional Contributor
Posts: 14

Re: how to use the same filter for multiple charts on same section

> convert charcter to numeric in filter only using parse.

>In below year is in character i coverted it in to numeric

 

IF ( 'year Parameter'p NotMissing )
RETURN ( Parse('year'n, 'NUMX4.') = Parse('year Parameter'p, 'NUMX4.') - 1 )
ELSE ( 'year'n NotMissing )

Contributor
Posts: 59

Re: how to use the same filter for multiple charts on same section

Posted in reply to vivek_sas

how do you convert a number to character?

SAS Super FREQ
Posts: 296

Re: how to use the same filter for multiple charts on same section

The Format() operator will return a string from a numeric. The name of this is sort of confusing, I know.
Occasional Contributor
Posts: 14

Re: how to use the same filter for multiple charts on same section

Using Format option

Occasional Contributor
Posts: 14

Re: how to use the same filter for multiple charts on same section

Hi @mhamlett

 

If you found answer to your question  . Can you please choose one of the replies as the solution by "Accepting it as a solution"? And perhaps mark the other as helpful by "Liking" it? This will help other community members who have the same question.


 

Thank you

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 9 replies
  • 605 views
  • 1 like
  • 4 in conversation