Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to set reference Line in a Cyclic Group?

Hi All,

We have a Requirement as below,

in Bar chart we are using Cyclic group as dimension(which has year,Quarter, Month,Day Fields in cyclic group).

Now we have to set Reference Lines (Nothing But Targets) for each individual Fields.

for Eg. Year wise target should be 1000, Quarter it may 250, for month it is 84 like wise..

Kindly provide us a solution.

Thanks

1 Solution

Accepted Solutions
jagan
MVP
MVP

Hi Reena,

I am not able to fixed that in existing chart, but when I tried to create the new one it is working, used the following as reference line expression.

=Pick(Match(GetCurrentField(cgNewGroup), 'Year', 'Quarter'), 1000000, 500000)

Replace cgNewGroup with your group name.

Regards,

Jagan.

View solution in original post

12 Replies
alexandros17
Partner
Partner

When you use cyclic group there is the instruction "getcurrentfield(GroupName)" that gets the information of which dimension field are you using in the group.

So you can write:

if(getcurrentfield(GroupName)=year, 1000,

if(getcurrentfield(GroupName)=quarter, 250,

100

)

let me know

Not applicable
Author

Hi Alessandro ,

Thanks for your reply.

We have tried the same,but unfortunately its not working. we are getting error while giving the "Group Name" in Expression.Please suggest..

Thanks..

error.png

alexandros17
Partner
Partner

Try with '

so:

... getCurrentField('abc') ...

let me know

Not applicable
Author

Still its not working..

Thanks..

martinpohl
Partner
Partner

Unfortunately the group name is interpreted as error but it works

alexandros17
Partner
Partner

I tried with an example of mine:

If(getcurrentfield(abc)='1S', 300, ...

the apex had to be added to the field name, sorry ...

PradeepReddy
Specialist II
Specialist II

As Martin explained,

whenever you give the Group Name it gives error in expression, but you will get the currently selected field  from Group.


GetCurrentField(Group_Name)

Not applicable
Author

Hi,

If possible please post me a sample, it is not working in my application.

Thanks..

Not applicable
Author

Hi,

I have attached a sample application for your Reference. Kindly do suggest me what changes i need to make to achieve my requirement.

Thanks..