3 Replies Latest reply: Feb 7, 2017 2:35 AM by Marcus Sommer RSS

    How to choose a Dimension via IF statement

    Giles Walker

      Hi Community Folks,


      Having trouble in another discussion thread and so wanted to launch a new thread to get one small issue resolved.


      I am working on a dynamic function for generating the appropriate Y-Axis scale based on a chosen x-axis dimension.  Auto-scaling doesn't produce the desired effect, so I have to create a manual scaling output.


      I have 3 aggregate chart dimensions that I can choose on the X-Axis, Total_Day, Total_Week, Total_Month.


      The IF statement I need to use to generate the Y Axis scale is something like this:


      If(<dimension chosen is Total_Day>, apply logic to determine visible scale, else..........)


      What syntax should be used to correctly script this bit:  If(<dimension chosen is Total_Day>

      As I am simply wanting to apply a Y-Axis scale based on the active dimension on X-Axis, it's not like I can evaluate if a dimension is equal to a value...........it's just if the dimension is active/chosen on X-Axis, then a logic is applied to generate the correct y-axis scale.

      Hope someone can assist.




      Original thread: https://community.qlik.com/message/1201229?&_ga=1.135812785.1875461385.1477533624#1201229