Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dszakris
Contributor II
Contributor II

Bar Chart Colours

Hello All,

I have a bar chart that spans 5 fiscal years. There is a filter for the user to select a single fiscal year. Due to this I need to use the brushing colour indicator. But with 2019-2020 having the pandemic effecting the data to, this needs to be colours aswell. 

I am looking for a way that these 2 expressions can be used together. 

Brushing: 

=If(GetSelectedCount([Fiscal Year Long])=0, '#3c1a40',
If(ISNULL([Fiscal Year Long]), RGB(0,160,205) , RGB (225,54,148))) 

 

2019-2020 colour indicator:

if([Fiscal Year Long]='2019-2020', RGB(0, 179, 176))

 

Is there a way for these to be combined?

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

Assuming the 2019-2020 one has precedence over the selected / not selected:

If([Fiscal Year Long]='2019-2020', RGB(0, 179, 176),

If(GetSelectedCount([Fiscal Year Long])=0, '#3c1a40',
If(ISNULL([Fiscal Year Long]), RGB(0,160,205) , RGB (225,54,148))))

There's no problem combining more if() statements (other than being hard to read).

View solution in original post

2 Replies
Or
MVP
MVP

Assuming the 2019-2020 one has precedence over the selected / not selected:

If([Fiscal Year Long]='2019-2020', RGB(0, 179, 176),

If(GetSelectedCount([Fiscal Year Long])=0, '#3c1a40',
If(ISNULL([Fiscal Year Long]), RGB(0,160,205) , RGB (225,54,148))))

There's no problem combining more if() statements (other than being hard to read).

dszakris
Contributor II
Contributor II
Author

Unfortunately, this does not work for my report.