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

Additional text required on line chart

Hi Folks

I'm after some help trying to duplicate the following line chart, specifically the text boxes that appear on the chart.

The chart uses the following as a calculated dimension

=Aggr ( Rank ( Sum ( _rFMV ) ) , CO_ShortName )

The value is calculated as

=Sum ( _rFMV ) / Sum (Total _rFMV )

My problem is this; using the "Text in Chart" function, I want to create a formula that shows me the number of companies (CO_ShortName) that are included up to the point where the Sum(_rFMV)/Sum(Total _rFMV) reaches 50%, I also want to trap the value of _rFMV for the company that takes the % value over 50%.

As a secondary issue, would it be possible to add that formula as an expression on the chart and have this shown as a symbol (I think I can probably manage that myself once the answer to the first question is forthcoming).

Thanks a lot for any help,

1 Solution

Accepted Solutions
stephencredmond
Luminary Alumni
Luminary Alumni

Hi Nigel,

I have uploaded a "How To" QVW to http://community.qlik.com/media/p/78614.aspx

Regards,

Stephen

View solution in original post

5 Replies
stephencredmond
Luminary Alumni
Luminary Alumni

Hi Kevin,

I was going to suggest the technique of adding a second expression as a Popup - but that doesn't appear to work in line charts!

If you are prepared to go with a bar chart for this, and you turn off the automatic popup labels (Presentation tab), take off the "Text as Popup" from the main expression, you can add a new expression which will contain code for a popup - you then turn off the "Bar" option for this expression and have "Text as Popup" on.

An expression like this might work:


=Aggr ( Rank ( Sum ( _rFMV ) ) , CO_ShortName ) & chr(13) &
'Value: ' & Num(RangeSum(Above((Sum ( _rFMV ) / Sum (Total _rFMV )), 0, RowNo())),'0.0%') & chr(13) &
'Companies: ' & RangeSum(Count(CO_ShortName), 0, RowNo())


This might be the closest to your requirements.

Stephen

Not applicable
Author

Hi Stephen

I would be very interested to see an example of how to use a second expression as a pop-up, this might be an approach we could use (if we convert to a bar chart).

Thanks

stephencredmond
Luminary Alumni
Luminary Alumni

Hi Nigel,

I have uploaded a "How To" QVW to http://community.qlik.com/media/p/78614.aspx

Regards,

Stephen

Not applicable
Author

@ Stephen

Thats pretty cool, thanks for sharing!

Not applicable
Author

Hi Stephen

That's exactly what I've been trying to do, didn't even cross my mind to have an expression that's neither a bar or line or symbol, great solution, thanks.