Ok, got it. Maybe you're just working out the details now, but the values you're using are not likely to give you good results, since they are very close in color-proximity. For example, can you really tell the difference between C40000 and C50000?
If you're trying to map two values into a color space, you're better off using one RGB component for one value, and other one for another value, like R for Dynamic Range (DR128) and B or G for Dynamic Range (DR).
Since you're only mapping 25 values, I would decide what colors I wanted to use when DR is 0 and DR128 is not, vice versa, and both 0. Then decide how to map values all the way up to full values (like FF).
With small numbers of items, you can create a lookup table for finding your colors values. Your 0 to 25 values can be used as listitem() indexes, where the list contains the 25 color values.
If both Dynamic Range R128 and DR values have maximum values, you can probably use that fact along with some smart Math() to calculate the ranges you'll use for the table lookup. And a table lookup I've shown you in some other thread regarding presenting a number of stars and half-stars.
Your functions currently have some problems. I'm assuming these are being used for thumbnail text (but I'm not sure of this).
save(replace(GroupSummary([Dynamic Range (DR)]), / avg,),avgrating)/
ifelse(
Compare([Dynamic Range (DR)], =, 0), ,
Compare([Dynamic Range (DR)], <=, 5), A,
Compare([Dynamic Range (DR)], <=, 10), B,
Compare([Dynamic Range (DR)], <=, 15), C,
Compare([Dynamic Range (DR)], <, 20), D,
Compare([Dynamic Range (DR)], =>, 20), ,
1, E )
save(replace(GroupSummary([Dynamic Range (R128)]), / avg,),avgrating)/
ifelse(
Compare([Dynamic Range (R128)], =, 0), ,
Compare([Dynamic Range (R128)], <=, 5), 1,
Compare([Dynamic Range (R128)], <=, 10), 2,
Compare([Dynamic Range (R128)], <=, 15), 3,
Compare([Dynamic Range (R128)], <, 20), 4,
Compare([Dynamic Range (R128)], =>, 20), ,
1, 5 )
Problem 1. The GroupSummary() functions takes the names of fields as arguments, without brackets. In thumbnail text, you must use forward slash to escape parens, which are part of the field name. The following is the correct usage:
GroupSummary(Dynamic Range /(DR/))
Problem 2. This portion of your expresssions:
Compare([Dynamic Range (R128)], =>, 20), ,
doesn't make sense, as the => is incorrect. You want >= if you mean Greater than or Equal to. But you're also assigning no value here (the else part of the ifelse is empty), so if you did mean >=, nothing at or above 20 would get a value. And yet, your next part assigns a 5, and yet it should never be reached. Maybe you added this because the => problem?
Problem 3. Maybe not. You're saving two different values into the global variable, and since you're not using it in the expressions, I'm not sure what you're trying to do here, esp. since in one part of the expression you're using the GroupSummary() value, but in the other using the singular value (but at a group level like thumbnail?).