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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
marwa_zerzeri
Contributor II
Contributor II

Two reference lines for two dimensions

Hello,

I made a line chart that contains two dimensions ([Month Year] and [DATE]) and a single measure (Outstanding savings). The [DATE] is an alternative dimension. I want to display for each dimension selected in the graph the appropriate reference line.

In the expression of the reference line, I did as follows but it always shows me the same reference line (the conition in the if always returns  False):

= if ([Month Year] = [Month Year],

avg (aggr (Sum ({$ <[Line Type] = {"Savings Outstanding"}, [Flag End Month] = {"1"}>} Balance), [Month Year])),

avg (aggr (Sum ({$ <[Line Type] = {"Savings Outstanding"}>} Balance), [DATE]))

)

I need to know the good condition. Thanks for your help.

2 Replies
felipedl
Partner - Specialist III
Partner - Specialist III

Hi Marwa,

You can do this by using a condition on the expression with GetCurrentField(cyclegroupname)

When you choose one of them, it should activate the appropriate expression based on the current cyclic group dimension.

marwa_zerzeri
Contributor II
Contributor II
Author

Hi Felip,

Thank you for the response. The function GetCurrentField(cyclegroupname) is not supported by Qlik sense.

Is there another solution?