Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Matrix table, WoW and YoY using calculated group in tabular editor 3

Hi any help would be appreciated

 

Table 1 has the following fields, taken from excel: Year (YYYY), Week (XX), Date (YYYYXX), Recipients, Engaged, and Revenue.

I have also created two measures:

Position - Calculates a value for each column depending on the position in the table. Latest week = 1, one week before the latest week = 2, one year before the latest week = 3, else 0.

There are multiple occurrences of all four of the values in my table.

Engagement rate - Calculates sum engaged/ sum recipients

 

I created a matrix table visualization from this data with Recipients, Engaged, Engagement rate, and Revenue, in my values section. And Year and Week in my columns section.

With a filter on the visual, that means only the latest week, one week before, and one year before date columns show i.e. position = 1, 2, and 3.

I want to add two more columns showing WoW and YoY for each of my values. To do this I believe I would need to create a calculated group using tabular editor.

To make it simpler I would also add my filtered date columns as measures.

However, I am struggling to know how to write these measures and keep getting stuck on aggregate functions within the measures.

 

I would like my visual to look like this:

 

 

Dummy example of the data: https://drive.google.com/file/d/1mtquj4u44u7EZiHIMEihPsj4GbssHL-a/view?usp=sharing

Open and download to access data

6 Replies