Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

cyclic group

hi friends, I have a question:

I define tow variables that called G and X and a cyclic group called group.1 with tow fields S.1 and S.2 .

I want to add a value in the variable of X.

I use this code for cyclic group:

G=getcurrentfield("group.1");

$(G) shows S.1 or S.2.//

If(G='S.1' , X=1, X=0)

But always X=0 and G='S.1' is not working. Please help me for this problem. TNX

1 Solution

Accepted Solutions
PradeepReddy
Specialist II
Specialist II

create variable 'X' like this..

=if(GetCurrentField("group.1")='S.1',1,0)

View solution in original post

10 Replies
sunny_talwar

What about this?

If($(G)='S.1', 1, 0)

PradeepReddy
Specialist II
Specialist II

create variable 'X' like this..

=if(GetCurrentField("group.1")='S.1',1,0)

Anonymous
Not applicable
Author

Go cyclic group and given the variable under the cyclic group

Not applicable
Author

Thanks, problem is solved

Not applicable
Author

Thanks, problem is solved

Anonymous
Not applicable
Author

Hi Abolfazl,

I'm glad to hear you problem is solved. Please take a moment to mark the reply that solved your question as the Correct Answer, so that it will show this thread as Answered. For step by step instructions on how to do this, check out this Community Tip. If you solved your own issue, please post your solution so that it may help others in the future.

Thank you,

Qlik Community Moderation Team

Not applicable
Author

hi, OK

Anonymous
Not applicable
Author

That formula really helped me, but my formula has red squiggly lines underneath indicating the expression editor does not like the cyclic group name with " " around it.

It works.  Can we just chalk this up to another one of those flaws in the Expression editor?

cyclic group formula.PNG

PradeepReddy
Specialist II
Specialist II

by default you will get red squiggly lines.. that is not not an issue..  your expression will work as expected..