That is not possible using view rules, but one option you have to achieve that, is moving your formula to a calculated field in your dashboard’s BAQ and then using the Grid’s Group By functionality to let it Count items on each group. Example:
- Display Fields:
- Calculated_DurationColor with the logic of your current Dashboard rules (edit as required):
if (Duration < 30) then ‘GREEN’
else if (Duration > 30 and < 50 then ‘YELLOW’)
else if (Duration > 50) then ‘RED’
else ‘OUT OF RANGE’
Now you will have a BAQ field with one of those color labels, or numbers 1, 2, 3 and 0, or any labels set of your choice.
Then you edit your Dashboard View rules to be:
Calculated_DurationColor Equals GREEN with Rule Action style = OK
Calculated_DurationColor Equals YELLOW with Rule Action style = WARNING
Calculated_DurationColor Equals RED with Rule Action style = ERROR
Then, make Group by visible on your Grid and group by Calculated_DurationColor. You will get a grouped grid result with the total of items on each group.
Similar to this example:
In your case, it will be as
-Duration: GREEN (30 items)
-Duration: YELLOW (2 items)
-Duration: RED (5 items)
-Duration: OUTOFRANGE (N items)
Hope that helps.