BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
itchyeyeballs
Pyrite | Level 9

Hi all,

 

Can anyone tell me what the maximum supported number of nested if statements is? 

 

I'm using the parameter trick to allow users to select which variable to group by, it would be useful to know how many options I can give them, I have six currently and the calculated item formula is getting long, I want to ensure I dont stretch it too far

 

ifstatement.GIF

1 ACCEPTED SOLUTION

Accepted Solutions
PeterWijers
Lapis Lazuli | Level 10

 

Sure,

this one directly calculates the report value related to the selected unit from the button select.

greetings

07-03-2017 22-05-09.png

View solution in original post

7 REPLIES 7
Sam_SAS
SAS Employee

I wrote the documentation for this part of the product and am not aware of any nesting limit. If there is a limit, I'll want to know about it so I can add it to the doc.

itchyeyeballs
Pyrite | Level 9

Great thank you,

 

Will report back if I run into any issues

 

PeterWijers
Lapis Lazuli | Level 10

Hi there,

please consider using if then else with a blank as an 'not true' answer.

now you can catenate the all the ifthenelse answers and trim them to one answer.

no nested loops, a beter overview and an endles solution.

greetings

itchyeyeballs
Pyrite | Level 9

Hi,

 

Can you give a brief example?

PeterWijers
Lapis Lazuli | Level 10

 

Sure,

this one directly calculates the report value related to the selected unit from the button select.

greetings

07-03-2017 22-05-09.png

itchyeyeballs
Pyrite | Level 9

That's a really interesting approach,

I wouldn't have attempted it this way as I would have assumed that adding 0 would have resulted in issues, it makes the formula much more readable,

I'll definitely test out switching to this syntax

Thank you

PeterWijers
Lapis Lazuli | Level 10

Good to hear you have an alternative now.

Small advice, relate the buttonbar to a seperate table that only consists of the selectable options.

This way you are sure that you always have all of the options. Using a group field might give a problem here.

 

Anyway, maybe its good to mark your request as solved.

 

Greetings and good luck,   Peter

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 7 replies
  • 4331 views
  • 3 likes
  • 3 in conversation