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: 
Anonymous
Not applicable

OrderNumber in a chart

Hi,

There is a chart where any set of brands may be displayed

For each brand in this particular chart I'd like to calculate an OrderNumber and according to this order number set a color using a Color function.

I tried this formular:

color(RowNo())

It fails to work correctly for my chart, maybe, it is because my chart is rather complicated.

Is there any other way to calculate an OrderNumber in a chart?

Thank you in advance,

Larisa

1 Solution

Accepted Solutions
sunny_talwar

Can you try it now?

View solution in original post

16 Replies
sunny_talwar

Not sure I understand the requirement? Would you be able to share some data to help understand the requirement?

Best,

Sunny

Anonymous
Not applicable
Author

I'd like this chart to be multicolured. This chart is based on a complicated formula. I'd like the formula to remain as it is.

So I need to set a certain colour for each bar. I'd like to take colours from a color pallete.

But if I set Color(RowNo()) in chart settings as a Background Color it distroys my formula.

I suppose that it is because of the function RowNo(). Maybe, there is some alternative.

See the file attached.

sunny_talwar

Try this expression:

=Pick(RowNo(), Red(), Green(), Blue(), Yellow(), LightBlue(), LightCyan(), LightGray(), LightGreen(), LightMagenta(), LightRed())

.Output:

Capture.PNG

Anonymous
Not applicable
Author

I see a different output. See the file attached.

I can I get a correct result?

sunny_talwar

Did you look at the attacted qvw? Re-attaching it with this post check it out or post your new qvw.

Best,

Sunny !

Anonymous
Not applicable
Author

Yes,

I opened your file and saw a different output.

I reattach the file.

Larisa

sunny_talwar

Lairsa -

I am not sure why it is doing that. Can you try opening this one to check if it is still doing the same thing?? Alternatively what happens when you add =Pick(RowNo(), Red(), Green(), Blue(), Yellow(), LightBlue(), LightCyan(), LightGray(), LightGreen(), LightMagenta(), LightRed()) as Background color to your own version you added here (not the one I sent). Does it still do the same thing?

Best,

Sunny

Anonymous
Not applicable
Author

Sunny,

It's all the same. I see the same result in your file and in my own file (see the file attached). It seems strange that we get different results.

I'm using SR2. I can not switch to a later version.

Regards,

Larisa

sunny_talwar

I am using SR10, but I am not sure if the version difference is causing this. The reason I say this is because we are using some very simple functions which should not have changed over the previous versions. But having said that, we are seeing different outputs and not sure how we can handle this unless I can replicate the same issue at my end.

Let me still see if I can work on another solution for you.

Best,

Sunny