Happy 8th birthday to the Maveryx Community! Take a walk down memory lane in our birthday blog, and don't miss out on the awesome birthday present that all Maveryx Community members get to take advantage of!
We would highly advise you to go through Part 1 & Part 2 and try to tackle creating this report with both merged row cells and merged column cells by yourself. You will learn a lot about “why do this step?” when you are experimenting and trying to create it by yourself. Use this blog only as a backup option to compare approaches or if you are stuck.
How to create an Alteryx report with both merged row cells and merged columns cells
Prepare the data in the desired format with all the required columns you wish to see in your output. Refer to the example below.
Now let's start by converting the data into the desired report first.
Step 1: Create the merged column header logic
Refer to Part 2 of this series. We will begin with creating the same exact logic.
Step 2: Create the merged row cells logic for the required columns
Here I want to create row merge cells under a blank column merge header. Hence, I will apply the row merged cells logic for only those columns.
Refer to Part 1 of this series. We will begin with creating the same exact logic for the selected columns. After implementing the logic, it should look something like the image below.
The only change, as you can observe, is the extra table tool. We need it because we need to maintain the same number of rows from each branch, and the expected number of rows was one. Hence we have used the table to merge multiple rows into one row.
Step 3: Create a method to pass the merged column header name
Create a Text Input tool with the merged column header name for each header like below:
Insert a Layout tool with the default configuration to merge tables in separate columns into a single table like below. The current configuration behavior is to merge columns horizontally.
Step 4: Excel & Other Format Outputs
The setup is the same as in Part 1 and Part 2. You can refer to them for more clarity.
Excel report output:
You might be asking us, “Hey, what if I want to have merged row cells under merged columns cells?”
You might already unconsciously know the answer.
Here is a hint:
This is like playing Tetris to find the best way to combine.