Table Row Versioning in Reporting

Where can I find the syntax used in the Version Key row to allow multiple colors on a table in 7.8 reporting. Below I have it working with

Event __>100?“Alarms”,“Standard”

But what I need is for Event to be in between 100 and 200 for Red

And will also need the same table to display Blue any event over 201

So let’s say you want Standard for < 100, Red for 100-200, and Blue for > 200, your row versioning could be like this:

Event __>100?(Event __>200?"Blue":"Red"):"Standard"

The parentheses aren’t necessary, just for clarity.

What’s with the 2 underscores? And is there a reference for syntax etc? I’m looking for other operators like AND, OR etc.

I’m also trying to make this work: Perf<95?(Perf>90?“badpower2”:“badpower”):“Standard”

less than 90 = badpower
90-95 = badpower2
greater than 95 = Standard

But so far I can’t make it work. The above results in everything using “badpower”.

I’m pretty sure the 2 underscores are just copied from the original post - they have no significance in keychain expressions.

The reference material for keychain expressions is available here.

Notably:
Parenthesis (expr) Nested expressions
Multiplicative *, /, % Multiply, divide, modulo
Additive *, - Add, subtract
Relational >, <, >=, <= Greater-than, less-than, greater/less-than-equal
Equality ==, != Equal, not-equal
Logical AND &&
Logical OR ||
Conditional ? : If/then - with form “expr? true_expr : false_expr”
Assignments =, +=

1 Like

@ctonge The syntax looks correct (tests out well too). Is the key “Perf” spelt exactly like that? No trailing spaces or anything to that effect?

The Key Calculations page in manual has some additional examples, but as @PGriffith points out the ReportMill’s docs could help as well.

1 Like

Ok, I’ve got this figured out. I failed to notice that I was formatting the value as a percentage, and there for my raw value was actually betwen 0 and 1. So it was always lower than 90! Hilarious. I have this figured out now. Thanks for the quick reply!!

1 Like