Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
gileswalker
Creator
Creator

How to choose a Dimension via IF statement

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.


Thanks


Giles

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

1 Solution

Accepted Solutions
shubham_singh
Partner - Creator II
Partner - Creator II

Knowing the active dimension is simply not possible.

View solution in original post

3 Replies
shubham_singh
Partner - Creator II
Partner - Creator II

Knowing the active dimension is simply not possible.

lakshmikandh
Specialist II
Specialist II

Have you tried Cyclic dimensions ?

Cyclic Dimension in Sense

marcus_sommer

In qlikview you would just use getcurrentfield() to get the active dimension of a dimension-group but this isn't available within qlik sense - but there is a workaround: Re: QLIK SENSE: $(=GetCurrentField(Time)).

- Marcus