Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

Condition on group field name

Hi Friends,

I have one cyclic group in which I have created one calculated dimension like

=CalendarMonthName& - &%Year        and Label its as Month

Now when I am applying condition on my cyclic group which is <cyclYM


it is not working



=if(GetCurrentField("<cyclYM")='=CalendarMonthName& - &%Year ',1,0)


1 Solution

Accepted Solutions
swuehl
MVP
MVP

The single quotes in your calculated dimension interfere with your expression to check current dimension, for example, you can try to replace them:

=if(Replace(GetCurrentField("<cyclYM"),chr(39),'|')='=YearOrg&| - |&%Month',1,0)

View solution in original post

9 Replies
Anil_Babu_Samineni

Use, Something like below in synthetically

I would ask you create in script

CalendarMonthName& - &%Year as FieldName


Try this?

=if(GetCurrentField([cyclYM]) = FieldName, 1,0)


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
agni_gold
Specialist III
Specialist III
Author

Thanks, but in script level, it is not supposed to done .

Any alternative in front end ?

Anil_Babu_Samineni

My recommend always in Back end only. If you want to forcibly to do in front end. I would ask to share sample application that demonstrates the issue?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
agni_gold
Specialist III
Specialist III
Author

here it is

Anil_Babu_Samineni

Can i know the reason why you don't want to do in Script because i felt it is very bad in Front end. Even you are using simple Year and Month only why can't club or create composite key and uses rather than complex. Still you need i recommend him mrkachhiaimp

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
agni_gold
Specialist III
Specialist III
Author

This is just a mock application , but in my actual application Year and Month fields are used from different tables.

agni_gold
Specialist III
Specialist III
Author

swuehl‌  can it be possible?

swuehl
MVP
MVP

The single quotes in your calculated dimension interfere with your expression to check current dimension, for example, you can try to replace them:

=if(Replace(GetCurrentField("<cyclYM"),chr(39),'|')='=YearOrg&| - |&%Month',1,0)

agni_gold
Specialist III
Specialist III
Author

You are so awesome man great !

Thanks