Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
FleetingImage
Contributor II
Contributor II

Bar Chart background color definition for each expression

Hi,

I'm trying to replicate a bar chart from QlikView into QlikSense.  This is what I have in QlikView:

FleetingImage_0-1607590261064.png

The chart uses 1 dimension: months of the year, and 2 expressions:

SalesCYear (blue bars): sales from this year

SalesPyear (yellow bars): sales from the prior year 

For each of these I defined the color, setting the background color attribute:

FleetingImage_1-1607590589096.png

The formula is:

if(Only({<Month=>}MONTH_NUM)=$(vYtdMaxdMonth),RGB(0,128,192),ARGB(100,0,128,192))

And in this case, vYtdMaxMonth = 10

The idea is that for the current month of the year (in the example is October) the color of the bar is RGB() and for the rest of the months the color is lighter (ARGB()), so the current month looks highlighted.

 

I haven't been able to figure out how to do this in QlikSense, any ideas? 

 

Labels (2)
1 Solution

Accepted Solutions
FleetingImage
Contributor II
Contributor II
Author

I was able to (kind of) solve the problem using the solution posted here:

https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Sense-How-to-set-custom-colors-by-measure-in...

This is the result:

FleetingImage_0-1607668234416.png

The only thing I would like to change is that I only want to show the number of the month and not that second label.  Any idea on how to remove it?

View solution in original post

3 Replies
pradosh_thakur
Master II
Master II

Use the exression as a master measure. Use the desired RGB expression there for color.

Learning never stops.
FleetingImage
Contributor II
Contributor II
Author

Hi Pradosh,

Could you please share with me an example?, when you say "there" is where exactly?

Thanks

 

 

FleetingImage
Contributor II
Contributor II
Author

I was able to (kind of) solve the problem using the solution posted here:

https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Sense-How-to-set-custom-colors-by-measure-in...

This is the result:

FleetingImage_0-1607668234416.png

The only thing I would like to change is that I only want to show the number of the month and not that second label.  Any idea on how to remove it?