Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

How to use an if statement conditional on the value of a cyclic-group?

Hi,

We created a cyclic group ("Time Cyc") that cycles through time variables - e.g. year-week, year-month, year-qtr.

I'd like to use if functions based on the currently selected value of the cyclic group.

e.g.:

if([Time Cyc]={'year-qtr'}, 1, 0)

but if appears I can't use the cyclic group as I would use any other variable........

can it be done? how?

Many thanks

Al

1 Solution

Accepted Solutions
Not applicable

Re: How to use an if statement conditional on the value of a cyclic-group?

Hi Al,

You can get the selected field within a cyclic/drilldown group by using the GetCurrentField function:

if(Match(GetCurrentField([Time Cyc]), 'year-qtr'), 1, 0).

View solution in original post

2 Replies
Not applicable

Re: How to use an if statement conditional on the value of a cyclic-group?

Hi Al,

You can get the selected field within a cyclic/drilldown group by using the GetCurrentField function:

if(Match(GetCurrentField([Time Cyc]), 'year-qtr'), 1, 0).

View solution in original post

Not applicable

Re: How to use an if statement conditional on the value of a cyclic-group?

Cheers! It works!

Many thanks