Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Bar Chart Color -> above and below Value

Hi,

i want to create a chart like this:

Bar char example.jpg

I think i could create this with a stacked bar chart.

But i dont know how to apply different colors according to being above/below plan value.

Does someone has already implemented something like that?

Phil

Labels (1)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Three expressions in a stacked bar chart:

=Rangemin(sum(Expression3), vThreshold)

=if(sum(Expression3)>vThreshold, sum(Expression3)-vThreshold)

=if(sum(Expression3)<vThreshold, vThreshold-sum(Expression3))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

11 Replies
tresB
Champion III
Champion III

See attached sample qvw

swuehl
Champion III
Champion III

Maybe like attached?

Two expressions in a stacked bar chart:

=Rangemin(sum(Expression3), vThreshold)

=if(sum(Expression3)>vThreshold, sum(Expression3)-vThreshold)

Anonymous
Not applicable
Author

Hey thanks guys! That really helps me.

But how can i change the expression to geht it in another color if its below plan?

Bar chart example 2.jpg

tresB
Champion III
Champion III

Could you post your sample qvw ?

swuehl
Champion III
Champion III

Open the expression attributes of the first expression by clicking on the small plus sign next to the expression label on upper left corner of expression tab.

Then edit the background color attribute expression:

=Black()

jonathandienst
Partner - Champion III
Partner - Champion III

Three expressions in a stacked bar chart:

=Rangemin(sum(Expression3), vThreshold)

=if(sum(Expression3)>vThreshold, sum(Expression3)-vThreshold)

=if(sum(Expression3)<vThreshold, vThreshold-sum(Expression3))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
HirisH_V7
Master
Master

Hi,

PFA,

For Line and Mutlicolored Stacks .

I hope this Helps,

Mutiple color bar chart based on range.PNG

Regards,

Hirish.

HirisH
Anonymous
Not applicable
Author

Hi Jonathan,

thats the right answer!

Thanks alot!

Phil

Anonymous
Not applicable
Author

Got another requirement.

So far it looks like:

Bar Chart Example 3.jpg

If I select more than one Year it looks like:

Bar Chart Example 4.jpg

How can i get this to show grouped? I guess thats not possible?

At the moment ive got one expression for each year.