Expression for format rule (help)

I`m trying to have a format rule for a change in prices.

In table Products, there are all the items information.
In table Orders, we have all items purchases. Once there has been a change in price (orders table), the price in the Products table gets updated.

I would like to have a format rule that would check (Orders table is sorted by desc date) if there are more than one entry for that product and if the price is higher (format rule 1) or lower (format rule 2).

How could a expression be constructed to achieve this?

many thanks

0 2 85
2 REPLIES 2

I have two points to make.

  1. You should probably use COUNT()
    COUNT() | AppSheet Help Center
  2. Format rules of this type may damage performance if you have lots of data. It might be a good idea to make a virtual column that your format rule checks instead of putting the formula in the format rule itself:
    Put format rule conditions in virtual columns

Hi Kirk,

Thanks for the points made.
I will have to understand better how can use count in this scenario and will read through the topic about format rules / Virtual columns.

Thanks

Top Labels in this Space