BookmarkSubscribeRSS Feed
GustavSandberg
Calcite | Level 5

Hi all,

 

I have two tables that are exactly the same. Same data, row, columns etc.

I have given them a filter each; both for "period". I want to be able to see Period 1 and Period 2 at the same time.

 

Is there now a way for me to add a third table, which displays the ratio between the cells in the two tables, when I have filtered for different periods in the two tables?

 

For example.

 

tables.png

 

Best regards,

Gustav

1 REPLY 1
Renato_sas
SAS Employee

Hi @Gust ,

 

I've assigned parameters to the filters (button bars in my example) to capture the period selection on each table. Parameters were called FilterA and FilterB.

Then I've created 4 calculations for FilterA_col1, FilterA_col2, FilterB_col1, and FilterB_col2. Their expressions are very similar, Here is the expression for FilterA_col1:

Renato_sas_1-1646870368245.png

Then I calculated the ratio between FilterA_col1 and FilterB_col1 and called it "Col1 Ratio", and then did the same for col2. This is the expression for "Col1 Ratio":

Renato_sas_2-1646870450418.png

 

This is the result:

 

Renato_sas_0-1646870095625.png

 

I hope this is what you wanted.

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
  • 386 views
  • 0 likes
  • 2 in conversation