Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey everyone, quick question.
I want to format the color of a dimension based on the row above in a straight table (checking if a field is a certain value).
I've tried in the color format:
=if(Above(field, 0, 1)='Y', rgb(50,50,50)), but this seems to completely mess up the sorting in the table that is based on another field value. Anyone know how I could do this? Thanks!
Disabling the sort by expression when using Above() in your color expression is documented in the HELP, see chapter chart inter record functions:
Note!
Sorting on y-values in charts or sorting by expression columns in straight tables is not allowed when Chart Inter Record functions are used in any of the chart's expressions. These sort alternatives are therefore automatically disabled.
Color expression is changing your sorting? Really? Have never seen that happening before
Change of sorting seems weird but I think your expression seems to be taking value from same row -
=if(Above(field, 0, 1)='Y', rgb(50,50,50)),
It could be like =if(rowno()>1,if(Above(field)='Y', rgb(50,50,50)))
Above(Field,0) points to same row.
Disabling the sort by expression when using Above() in your color expression is documented in the HELP, see chapter chart inter record functions:
Note!
Sorting on y-values in charts or sorting by expression columns in straight tables is not allowed when Chart Inter Record functions are used in any of the chart's expressions. These sort alternatives are therefore automatically disabled.
Yeah I have a column just for sorting by numeric value that ascends 1 to n. Apparently the Above() function messes with that, it stacks all the rows where the condition is met (field = 'Y') to the top before sorting the remaining ones correctly and no coloring is applied..
Thanks for your suggestion, but that doesn't seem to work.
try this
if(Above(field)='Y', rgb(50,50,50))
Thanks for your answer, do you happen to know a workaround? I am currently sorting by numeric value of a column, what else can I sort by if not by a column expression? What I'm trying to do is color just the rows below rows with a certain field value.
That doesn't seem to differ from my initial attempt in the post.