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

Dynamic Target Line Expression


I got a requirement to include target line for chart which has a drilldown from Year-->Month-->Week-->day-->Hour.

Right now I was given a static value for day, Can I make an expression out of it and make it dynamic upon drill down selection.

Any Ideas would be really appreciated..

Thanks!!

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

You can,  if your Drill group is called 'DrillGroup', you can use GetCurrentField() function to return the level:

EX:

if( GetCurrentField([DrillGroup]) = 'Day' ,  1000)

View solution in original post

7 Replies
JonnyPoole
Employee
Employee

You can,  if your Drill group is called 'DrillGroup', you can use GetCurrentField() function to return the level:

EX:

if( GetCurrentField([DrillGroup]) = 'Day' ,  1000)

veidlburkhard
Creator III
Creator III

Hi Sanhya,

you can use: GetCurrentField(YourDrillDownGroup)

which gives you the fieldname you are currently displaying from your drilldown group.

Don't you mind Qlikview will mark this as a mistake but will execute it correctly.

Hope this helps

Burkhard

Not applicable
Author

I don't see my Drilldown Group name to write in expression.

JonnyPoole
Employee
Employee

Here is a screenshot to guide you.

In getcurrentfield()  wrap the drill group name in square brackets []

as mentioned above: 

EX:

if( GetCurrentField([DrillGroup]) = 'Day' ,  1000)

Untitled.png

Not applicable
Author

2.PNG.png

1 (2).PNG.png

anything wrong here?

JonnyPoole
Employee
Employee

yes ! you have at typo !  your group is actually:   Scheudling DrillDown.

However, even after the correction it may still underling a mistake (but say OK) above. if that is the case just hit ok

Not applicable
Author

Thank you.. it worked well..