Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

gileswalker
Contributor

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
Highlighted
shubham_singh
Contributor II

Re: How to choose a Dimension via IF statement

Knowing the active dimension is simply not possible.

3 Replies
Highlighted
shubham_singh
Contributor II

Re: How to choose a Dimension via IF statement

Knowing the active dimension is simply not possible.

lakshmikandh
Valued Contributor II

Re: How to choose a Dimension via IF statement

Have you tried Cyclic dimensions ?

Cyclic Dimension in Sense

Re: How to choose a Dimension via IF statement

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

Community Browser