Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

paulyeo11
Valued Contributor II

How to make Bar with -ve value color change to RED ?

Hi All,

I have a chart which have +ve and -ve value , I like to make -ve value bar color change to RED.

Can some one advise me.

Paul

1 Solution

Accepted Solutions
paulyeo11
Valued Contributor II

Re: How to make Bar with -ve value color change to RED ?

Hi Chanty

Thank you for your expression below :-

If(SOURCE>0,red())

I try and found not work , suddenly i recall i have did it in QV , and i copy the script from background color expression below and it work fine :-

if(

money(

Sum({$<year = {$(=Max(year)-0)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}profit_amt/1000)

, $(vMoneyFormatK))

-

money(

Sum({$<year = {$(=Max(year)-0)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}Exp/1000)

, $(vMoneyFormatK))

>0, Green(), Red())

4 Replies
paulyeo11
Valued Contributor II

Re: How to make Bar with -ve value color change to RED ?

Enclosed my QS Doc

sureshqv
Esteemed Contributor III

Re: How to make Bar with -ve value color change to RED ?

chk attached

paulyeo11
Valued Contributor II

Re: How to make Bar with -ve value color change to RED ?

Hi Chanty

Thank you for your expression below :-

If(SOURCE>0,red())

I try and found not work , suddenly i recall i have did it in QV , and i copy the script from background color expression below and it work fine :-

if(

money(

Sum({$<year = {$(=Max(year)-0)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}profit_amt/1000)

, $(vMoneyFormatK))

-

money(

Sum({$<year = {$(=Max(year)-0)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}Exp/1000)

, $(vMoneyFormatK))

>0, Green(), Red())

sureshqv
Esteemed Contributor III

Re: How to make Bar with -ve value color change to RED ?

yeah/.......i saw ur selected in ur filter as Source  so i hve given  that expression

Community Browser