How to do this depends on whether your columns Dim1-Dim3 are each their own separate field in your data or just different values of some dimension [Dim].
If those are separate fields, you will need to unpivot those fields into [Field Names] and [Field Values] fields. You can then create a calculated field [Header] : IF [Field Names] = "Dim1" OR [Field Names] = "Dim2" THEN "Dim4" ELSE "" END
If those are values of the dimension [Dim], you can create a similar [Header] calculation: [Header] : IF [Dim] = "Dim1" OR [Dim] = "Dim2" THEN "Dim4" ELSE "" END
Either way, you can add [Header] to "Columns" alongside either [Field Names] or [Dim] to get what you want.