Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jose_vargas
Creator
Creator

Show value in legend - Line Chart

Hello-

I have a Line Chart for sum amount for each month and year, my legend is year and i need to show the total  in legend for each year.

I Attach the image and need to put in the red box the total.

Is that possible? Thanks

5 Replies
vishsaggi
Champion III
Champion III

In your Chart properties -> Presentation tab -> Got to text in chart and add your expression.

=Aggr(Sum(Yourfield), YourYearField)

Like here:

Capture.PNG

jose_vargas
Creator
Creator
Author

Hello, its no work... When i did that, the value show in chart, i need yo show the value in text legend, next to the year in my case.

vishsaggi
Champion III
Champion III

Can you share a sample app to look into?

jose_vargas
Creator
Creator
Author

Yes.. Look the legend "Año"  (year), i want to show the sum of each year.

2017-03-29 16_26_00-MantenimientoTI.jpg

vishsaggi
Champion III
Champion III

Check here? Use the sum expression in your Presentation tab Text in chart Add these expressions and drag them to the legend.

= '(' & Sum({< Ano = {'2016'}>} YourExprField) & ')'

= '(' & Sum({< Ano = {'2017'}>} YourExprField) & ')' .....

See attached. Then using ctrl+Shift you will see different Graph objects with Red rectangles like image below, then you can move those numbers to their respective year legend.

Pic.png