Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Adjusting reference line for drilldown dimension

 

Dear all,

I have a chart with a drilldown dimension and I want the reference line (showing the average) to adjust automatically to the second dimension.
Take for example the image below. The reference line displays the average sales of all countries. If I select Germany now, I want the reference line to adjust to the sales of German countries, i.e. displaying the average sales above all German cities.

Or is there a possibility to hide the reference line when going into the second dimension? 

 

Many thanks for any help!

Unbenannt2.png

 

 

Labels (3)
2 Replies
Highlighted
Employee
Employee

You could add two reference lines, one for Country Average and one for City Average and they would both be visible, but the Country average would be out of range when you select a single country

Highlighted
Contributor
Contributor

Hey Qliklearner11, 

You should be able to do something like this. 

=Avg(Aggr(Avg(Sales),"$(=If(IsNull(GetFieldSelections(Country))=True(),'Country','City')"))

 

Let me know if it doesn't work