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

Creating dynamic Reference Lines in a Bar Chart

Hello everyone,

I am creating a Bar Chart which displays the Turnover percentage of each area of a Company.

I want do add a reference line to the chart, that change the value when the user apply a filter.

Below is the field and value that i want to add as a Reference Line:

turnover.JPG

"Farma Brasil" will be one Reference Line and "Farma Total" will be the second Reference Line.

So, whenever the user filter the year, the line value should change according to the "Turnover Total" value.

Thanks

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Add two reference lines as below

Avg({<Company = {'Farma Brasil'}>}[Turnover Total])

Avg({<Company = {'Farma Total'}>}[Turnover Total])

View solution in original post

2 Replies
swuehl
MVP
MVP

Create two reference lines on presentation tab.

The expression for the reference lines may look like

=Only({<Company = {'Farma Brasil'}>} [Turnover Total])

resp.

=Only({<Company = {'Farma Total'}>} [Turnover Total])

and will only return a values with a selected Year.

MK_QSL
MVP
MVP

Add two reference lines as below

Avg({<Company = {'Farma Brasil'}>}[Turnover Total])

Avg({<Company = {'Farma Total'}>}[Turnover Total])