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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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