Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
cmillerclaritas
Contributor II
Contributor II

Conditional Color with Cumulative Sum

All, I'm hoping to get some help with conditional coloring a running total. I have the following expression:

RangeSum (above(sum(Sales),0,RowNo()))/sum(total Sales) - this generates a great cumulative % total.  No problems here. 

Next, I wanted to color the values in this column red if they were less than 80%, highlighting those that made up the 80% group worthy of focus. I put the following in the background text color box but no luck. 

if(RangeSum (above(sum(AirFare),0,RowNo()))/sum(total AirFare) <0.8, Red(), Black()) 

I was trying to say that if this calculation comes out to less than 80%, color the cell value red otherwise black...

Any help would be appreciated. 

1 Solution

Accepted Solutions
Yoshidaqlik
Creator II
Creator II

Hi

seems to be correct, I think only one ()

if((RangeSum (above(sum(AirFare),0,RowNo()))/sum(total AirFare)) <0.8, Red(), Black())

regards

YoshidaQlik https://www.youtube.com/channel/UC1I9P8MqCZEhB6Nw3FdSqng

View solution in original post

4 Replies
Yoshidaqlik
Creator II
Creator II

Hi

seems to be correct, I think only one ()

if((RangeSum (above(sum(AirFare),0,RowNo()))/sum(total AirFare)) <0.8, Red(), Black())

regards

YoshidaQlik https://www.youtube.com/channel/UC1I9P8MqCZEhB6Nw3FdSqng
martinpohl
Partner - Master
Partner - Master

Hi,

give your expression a label (e.g. percentages) and use label in formatting expression

if(percentages < 0.8, red(),black())

Regards

cmillerclaritas
Contributor II
Contributor II
Author

Thanks very much for your suggestion...will give it a shot! 

 

Chris

cmillerclaritas
Contributor II
Contributor II
Author

Thanks for taking a look at this. Parentheses are one of those small things that make or break you depending on the day! Chris