Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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
Author

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).

Not applicable
Author

Cheers! It works!

Many thanks