Create Custom Measure Relationships in Your Tableau Data Story
You can create a relationship story in your Tableau Data Story to see how data compares to another set of data. To build a relationship story, you must have at least two measures and one dimension. Data that you'd like to compare is often grouped into one column of data named something such as "Year" or "Month," with values such as "2022" or "March."
You can Create a Simple Calculated Field to separate "2022" from "2021" (or March from February), so that you can compare the two time periods in a relationship story.
- Start in the sheet that you want to use in your Data Story.
- Click Analysis, and select Create a Calculated Field.
- Create a calculated field such as "Current Period."
Tip: Follow the structure of the calculated field shown here, but substitute your own dimension or measure names (orange text).
- Create a calculated field such as "Previous Period."
- Drag the new measures onto the Detail mark.
- From your dashboard, click the story and add the two new measures into your Data Story.
- From your dashboard, click the Settings icon at the top-left corner of your Data Story object.
- In the Data Story dialog box, click the Relationships tab.
- Set up a relationship story with the two custom measures.
- Click Save.
Your story now writes sentences that compare the custom measures.