Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Check Above row for value

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!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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.

View solution in original post

8 Replies
sunny_talwar

Color expression is changing your sorting? Really? Have never seen that happening before

Digvijay_Singh

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.

swuehl
MVP
MVP

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.

Not applicable
Author

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..

Not applicable
Author

Thanks for your suggestion, but that doesn't seem to work.

Kushal_Chawda

try this

if(Above(field)='Y', rgb(50,50,50))

Not applicable
Author

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.

Not applicable
Author

That doesn't seem to differ from my initial attempt in the post.