Attention: when using interrecord functions in combination with RowNo(), this approach will only work correctly, if the dimension order doesn't influence the RowNo() value!
Example 1: simple aggregation functions
When using aggregation functions, swapping of x-axis and legend is very simple:
You only have to change the dimension order.
Now let’s change the dimension order, it works as supposed.
Example 2: inter-record functions
Now I’d like to calculate the sales of the preceding day with the help of the above() function.
If you change the dimension order, you’ll get the following result, because the first dimension is “different” by every line of the table, so there’s no line “above” within the same dimension:
A possible solution:
Change the dimension order of the diagram, but don’t change the dimension order of the formula by using the aggr() function
If you know a better solution, please contribute.