BookmarkSubscribeRSS Feed

SAS Visual Analytics: A look at the new Expression Editor (Part 1)

Started ‎11-02-2023 by
Modified ‎11-02-2023 by
Views 571

The new Expression Editor was first introduced in Stable 2023.06 (June 2023) and will be made available in the LTS 2023.10 (November 2023) release. There are some noticeable changes and I wanted to point out how to use some of the new features.

 

The quote from Paul Cezanne, "It's so fine and yet so terrible to stand in front of a blank canvas" can resonate when you first look at the new expression editor. This can be especially true if you don’t want to start typing syntax! But don’t worry, as soon as you start to click in the editor, you’ll find your fears put to ease.

 

In Part 1 of this series, I will focus only on point-and-click instructions for building expressions. Part 2 of this series will demonstrate the coding features.

 

 

01_TP_New-VS-Previous.png

Select any image to see a larger version.
Mobile users: If you do not see this image, scroll to the bottom of the page and select the "Full" version of this post.

 

 

Subtraction Expression

 

Let’s first look at building a simple expression. The only thing you’ll need to do is point, click, and place your cursor in the second argument position. In less than ten steps, you can build this subtraction expression.

 

 

02_TP_SubtractionExpression.png

 

 

03_TP_SubtractionStep1.png

 

 

04_TP_SubtractionStep2.png

 

 

05_TP_SubtractionStep3.png

 

 

06_TP_SubtractionStep4.png

 

 

The key take aways from this example are:

 

  • Single click to add operators, functions, or data items to the expression editor.
  • Place your cursor at the position you want to add a new operator, function, or data item.
  • Type in the filter at the top to narrow down selections.

 

 

IF... ELSE with In Condition Expression

 

This is a commonly used expression in most reports I build, usually to build a flag indicator to define Display Rules. Let’s take a look at how to build this using the new expression editor.

 

 

 

 

The key take aways from this example are:

 

  • Some functions have an expression builder wizard.
  • To get back to the expression builder wizard, right-click anywhere inside the expression then select Edit.

 

 

08_TP_ReopenExpressionBuilderWizard.png

 

 

09_TP_EditInCondition.png

 

 

Ratio with Sum numerator and AggregateTable denominator Expression

 

This last expression I want to build comes from the article: SAS Visual Analytics Report Example: Percent of Total – For All, For Rows, and For Columns.

 

The need to find a column’s percent of total has been popular recently, so let’s take a look how we would build this using the new expression editor. Feel free to read the entire article, but here are the expressions we will need to build using the new expression editor.

 

 

10_TP_Column_Expression_Example.png

 

 

And here is my screenshot of the solution using the previous expression editor.

 

 

11_TP_Previous_Column_Expression.png

 

 

Here is a screenshot of the solution using the new expression editor.

 

 

12_TP_New_Column_Expression.png

 

 

Here’s the demonstration:

 

 

 

The key take away from this example is:

 

  • You can build out your expression structure then go back and assign data roles, aggregations, etc.

 

Conclusion

 

I hope that you are now less weary about using the new Expression Editor. There are lots of new features I haven’t covered yet, but I will cover the coding using inline help and code completion for the Part 2 article.

 

When using point-and-click for the expression editor, here’s a summary of the things to keep in mind:

 

  • Single click to add operators, functions, or data items to the expression editor.
  • Place your cursor at the position you want to add a new operator, function, or data item.
  • Type in the filter at the top to narrow down selections.
  • Some functions have an expression builder wizard.
  • To get back to the expression builder wizard, right-click anywhere inside the expression then select Edit.
  • You can build out your expression structure then go back and assign data roles, aggregations, etc.

 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎11-02-2023 07:14 PM
Updated by:
Contributors

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Labels
Article Tags