Forum Discussion

FlorisvdPoel's avatar
FlorisvdPoel
New Contributor III
2 years ago

Primary and secondary axis align 0 point

Hi everybody,

Below you can see a graph created for a client.

A question coming from them is that they want to align the 0 points (highlighted) of both the primary (left) axis and the secondary (right) axis. I've tried (amongst others) to change the visual and whole range, scaling options but it doesn't seem to change anything. 

 

Does anybody know if it is possible to align the 0 points? 

Thanks!

Floris

  • Hi Ben, and others who are reading this,

    Found a solution based on inspiration I got from Ben's solution.

    What I did in the underlying cube view that feeds the data adapter feeding the graph is adding identical rows to the current cube view. The only difference with these rows is that they multiply the data from the original rows by -1. What you get is a reversed version of the original data. 

    Within the report, I added these as series and set their color to transparent. 

    This solution forces the 0 on both axes into the exact center, since the extremes are equal but inverted. Below the result: 

     

    This solution is also dynamic!

    BenThompson thanks for your help and inspiration.

    Floris

  • FlorisvdPoel's avatar
    FlorisvdPoel
    New Contributor III

    Hi Ben, and others who are reading this,

    Found a solution based on inspiration I got from Ben's solution.

    What I did in the underlying cube view that feeds the data adapter feeding the graph is adding identical rows to the current cube view. The only difference with these rows is that they multiply the data from the original rows by -1. What you get is a reversed version of the original data. 

    Within the report, I added these as series and set their color to transparent. 

    This solution forces the 0 on both axes into the exact center, since the extremes are equal but inverted. Below the result: 

     

    This solution is also dynamic!

    BenThompson thanks for your help and inspiration.

    Floris

    • FlorisvdPoel's avatar
      FlorisvdPoel
      New Contributor III

      Hi Ben,

      I appreciate your answer. However, my chart contains both periodic and ytd values. When taking the max value of this dataset (i.e. YTD M12 in most cases) it will indeed align my 0 points (for that matter all values on the axes). However, my periodic data (bar charts) will become too small. Applying this would actually take away the use of the secondary axis. Please see the screenshot below for explanation.

       

      Any ideas?

       

      Thanks!