Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Display additional info to a bar in a barchart?

Hi,

I want to display some additional information rgd. the bars in a barchart - not optionally, that could be done quite easily, but simultaneously.

I have noticed that seemingly it isn't possible to use a line_break in the expression (to be displayed inside a segment),

=> so I have created a second expression that is displayed only when one of the bars has been selected and that has no bar or line
     associated, but a text on the axis.

<=> That works, but still I cannot use a line_break in that expression so as to display several values.

How could I do that?

Thanks a lot!

Best regards,

DataNibbler

16 Replies
giakoum
Partner - Master II
Partner - Master II

add some section analysis that will disregard the chart dimension

MK_QSL
MVP
MVP

Something like

SUM(Sales)/SUM({<Customer = >}TOTAL Sales)

datanibbler
Champion
Champion
Author

Hi Manish,

exactly. Only that hasn't worked yet. There must be some syntax error in my formula.

Let me see ...

datanibbler
Champion
Champion
Author

Hi,

"Bekannte_Gründe_für_Abweichungen" is the dimension of this chart.

"FKolli_ID" is the field that I want to count.

For some reason, this formula

>> num((Count(FKolli_ID) / COUNT({$<Bekannte_Gründe_für_Abweichungen = >} FKolli_ID)), '#.##0,00 %')  <<

returns 100% on every bar (without any selections made)

(I want to differentiate my formula of course, depending on whether or not the user has made any selections)

I guess I have to wrap my IF(GetselectedCount() around the entire construct (all three lines of info to display)

<=> I still cannot seem to get it right.

MK_QSL
MVP
MVP

You missed TOTAL

num((Count(FKolli_ID) / COUNT({$<Bekannte_Gründe_für_Abweichungen = >} TOTAL FKolli_ID)), '#.##0,00 %')  <<

datanibbler
Champion
Champion
Author

That looks good.

But why do I need that in addition? I thought the set_expression already overrides the user's selections on this field ...

Well, let's see ...

It works. Thank you!

Best regards,

DataNibbler

MK_QSL
MVP
MVP

Here you are showing relative percentage so TOTAL is needed. Also, if we don't use {<FieldName = >}, whenever you select any value from your dimension, you will get 100% as now you are comparing one value to one TOTAL value.