BookmarkSubscribeRSS Feed
rodrigo_pereira
Obsidian | Level 7

Hello experts,

Starting in version 7.4 SAS introduced the very useful functionality of "dynamic labels".

 

I'm trying to display just the average of one measure (let's say Revenues) over the 3 last months. The question here is: how SAS will know from which month to start when I'm using relative period. Should I use a parameter? And how? 🙂

 

This works perfectly if I put a "crosstab" with all the months and calculate the average with "RelativePeriod" function. However, if I don't want to display all the months and just present the average (in a dynamic label) how can I construct this?

 

Thank you very much in advance.

 

Rodrigo

 

1 REPLY 1
Sam_SAS
SAS Employee

Hello Rodrigo,

 

Moving Average is an aggregated operator and it doesn't really work unless it is assigned to a visual like a crosstab or graph.

 

As dynamic text in a Text object, there is no aggregation context to work with. (Arguably, you should not be able to assign aggregated measures as dynamic text.)

 

In general, making a dynamic date selection based on the most recent date can be tricky. I seem to understand it is a limitation of how LASR and now CAS handle date values, but it is frustrating. Hopefully someone can help you find a good workaround.

 

Sam

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 996 views
  • 1 like
  • 2 in conversation