Qlik Community

QlikView Documents

Documents for QlikView related information.

Using inter-record functions: swap x-axis and legend in charts

roharoha
Valued Contributor III

Using inter-record functions: swap x-axis and legend in charts

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!


Sample input


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.

Comments
Not applicable

thxs , so useful

Version history
Revision #:
1 of 1
Last update:
‎04-13-2016 03:29 PM
Updated by: