Forum Discussion
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
- lbendlin
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- AnonymousNot applicable
I've attached a copy of my dummy data and added a quick visual of what I intend to get to, on the post. I would really appreciate it if you could have a look for me. Thank you in advance
- lbendlin
Super User
Do the Year and Month numbers have to be dynamic or can they say "This Month","Last Month","Same Month Last Year" ?
You should seriously consider using separate visuals though. That would be less confusing for your users.