2 Replies Latest reply on Feb 23, 2016 5:53 AM by Richard Gordon

# How do I calculate Value Difference over a X by Y contingency table

This question builds on my previous question, "How do I create a Distribution Differences by Segment chart?" (big shout out to Yuriy Fal)

No that the population has been accounted for, the question is how to illustrate that a value dimension reacts differently by profile groups within each segment.

The desired target output is the following, which shows the segment average (blue line) and then the average values by profile type (colored dots).

Needed Output would be just the differences chart:

rg

• ###### 1. Re: How do I calculate Value Difference over a X by Y contingency table

Richard,

You can create a calc for difference like this:

Difference: {fixed [Profile], [Segment] : avg([Value]) } - { fixed [Segment]: avg([Value]) }

Place segment on columns, this calc on rows and AVG(value) on rows also. Click on the dropdown of the AVG(Value) calc and select dual axis. This creates 2 marks cards. On the 1st marks card, select mark type as circle and place profile on color. On the 2nd marks card, select mark type as line and place nothing on level of detail. And you should have it:

1 of 1 people found this helpful
• ###### 2. Re: How do I calculate Value Difference over a X by Y contingency table

Pooja,

Thank you for taking the time to answer this question, just what I needed!

rg