Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: 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

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

You missed TOTAL

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

View solution in original post

16 Replies
giakoum
Partner - Master II
Partner - Master II

chr(10)

datanibbler
Champion
Champion
Author

Hi,

thanks a lot 😉

I know that chr(10) will generate a line_break - the thing is, the second line of info that I have written is not being displayed.

MK_QSL
MVP
MVP

Something Like This?

giakoum
Partner - Master II
Partner - Master II

yes true not as text on axis

try value on data points

giakoum
Partner - Master II
Partner - Master II

or maybe use text in chart instead as it is only displayed when one bar is selected

datanibbler
Champion
Champion
Author

Thanks!

That is just what I'm looking for.

@ Manish

There are two separate expressions in your object - what do I have to do to get those two to display in the same spot, not next to each other?

datanibbler
Champion
Champion
Author

Hi,

okay, so far it works.

But - I want to display the percentage of items in the scenario that the user has selected compared to the total nr. of items - how do I do that? Seemingly, when I use >> COUNT([item] / COUNT({1} [item]) <<, the chart doesn't display anymore.

MK_QSL
MVP
MVP

Aggr(Num(SUM(Sales)/SUM(Target),'#0%') & '-' &SUM(Sales),Customer)

datanibbler
Champion
Champion
Author

Hi,

any ideas?

That approach with the Aggr() works as long as the user has not selected anything - but as soon as he has selected one of the bars, the displayed percentage goes to 100% ... it should remain at what it displayed before the selection, so it should ignore the user_selection - but using a set_expression with the {1} didn't work so far.

Thanks a lot!