Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

antwnina
New Contributor III

Dynamic coloring for unknown number of bars

Hello there I have this situation; in my application, there is a bar-chart which displays the selections of the multibox next to it. I'm making the selections only from one field the ChannelName; TV Channels, to see the monthly statistics. For example, I want to select CNN, BBC, Discovery the dimensions are the Month and the ChannelName. The thing is that all the bars have the same color. I thought to put for the beginning the random coloring  with the command in background color of expression "argb(255,rand()*255,rand()*255,rand()*255)". But this isn't helping a lot with just a glance. How can i color the bars and the ones with the same name to have the same color despite the dynamic selection of the channels?

2 Replies
Highlighted
vinieme12
Esteemed Contributor II

Re: Dynamic coloring for unknown number of bars

Highlighted
antwnina
New Contributor III

Re: Dynamic coloring for unknown number of bars

Thank you for the reply @Vineeth but the thing is here is my expression:

=sum( {< CalendarMonthYear = {"$(=Date(max(LinkTable.Date), 'MMM-YYYY'))"} >}  TV_ChannelStatistics.Total)

/ count( {<  CalendarMonthYear = {"$(=Date(max(LinkTable.Date), 'MMM-YYYY'))"} >}  distinct TV_ChannelStatistics.DateTimeReaded)

as the reference says I have to enter the expression in the background color of it in Colormix Wizard. I entered the same expression, is that right?
even with this action, it didn't change anything.

Can you provide me some more help, please?

Thanks in advance