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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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