Hoping this will be a quick answer. But, I’m building a report and want to highlight certain rows based on the Time/Date. But, I still need to see All of the data. Think of it like highlighting Values in a peak period. The formatting is based 1. on the day of the week and 2. on the time of day.
For example: If I wanted to highlight rows on “Wednesday” after 10, but the table looks like the following.
I’m sure I’m referencing my time of day value wrong, but I’m also unsure if my nested condition is correct either. It must be evaluating as “True” because all of the cells are highlighted.
You can't compare a date against a string and an integer. You'll need to create separate parameters that store the day of the week string and hour integer for comparison.
I’m assuming I need to replace the “data” in the system.date.format() to my Historian data source? So it would look like data['dayOfWeek'] = system.date.format(Total_demand_kW['t_stamp'], "EEEEE").
But it doesn’t recognize Total_demand_kW that as a global name
Leaving it as “data” gives me an updateDataKeyError for the t_stamp
As a tangent, I'd probably add a row to the dataset that defined whatever condition(s) you want to express as formatting.
That is - add a column that contains either null or "OutOfRange" or whatever, based on your full business logic (expressed in Python code within your script datasource). Then give the report row 'alternate' versions based on that column, and only deal with the presentation within those alternate rows.
You'll save yourself a lot of grief down the road if the business logic ever has to change and you don't have to click between a hundred table rows and cells trying to find all the key expressions you set up.