Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mikecrengland
Creator III
Creator III

Bar chart coloring

Hello,

We are moving from QlikView to Cloud and I'm trying to replicate a simple bar chart with colors based on greater than/less than zero. It has 15 expressions and no dimensions. I can't figure out where/how to color the bars based on the value. A picture of the graph attached.

I've tried the bar chart, combo chart (can't get it to work without a dimension) and a couple of extensions..

 

Thanks,

Labels (4)
1 Solution

Accepted Solutions
brunobertels
Master
Master

may be add a dummy dim with valuelist function 

dim 

valuelist('A','B','C') withe the list of your 15 metrics 

Mesure 

If(valuelist('A','B','C')='A' , metricsA, 

If(valuelist('A','B','C')='B' , metricsB, etc ... 

then in the panel function 

select color by mesure aned this kind of mesure 

If(valuelist('A','B','C')='A' , if(metricsA<0, lightred(),green())

If(valuelist('A','B','C')='B' , if(metricsB<0, lightred(),green()), etc 

 

not tested 

regards 

 

View solution in original post

3 Replies
Anil_Babu_Samineni

Perhaps try with Waterfall chart?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
brunobertels
Master
Master

may be add a dummy dim with valuelist function 

dim 

valuelist('A','B','C') withe the list of your 15 metrics 

Mesure 

If(valuelist('A','B','C')='A' , metricsA, 

If(valuelist('A','B','C')='B' , metricsB, etc ... 

then in the panel function 

select color by mesure aned this kind of mesure 

If(valuelist('A','B','C')='A' , if(metricsA<0, lightred(),green())

If(valuelist('A','B','C')='B' , if(metricsB<0, lightred(),green()), etc 

 

not tested 

regards 

 

mikecrengland
Creator III
Creator III
Author

Thank you!

Had to change it a little... a sample

=If($(PricingMetricVL) = 'RPM' AND $(vRevenue_RPM) < 0, Red(),
If($(PricingMetricVL) = 'RPM' AND $(vRevenue_RPM) >= 0, Green(),
If($(PricingMetricVL) = 'CPM' AND $(vRevenue_CPM) < 0, Red(),
If($(PricingMetricVL) = 'CPM' AND $(vRevenue_CPM) >= 0, Green(),

 

PricingMetricVL = variable containing my valuelist()

vRevenue_RPM = variable containg my expression