In My app I have these fields:
- dog
- day
- start datetime
- end datetime
- duration (difference between them)
- personal standard duration
now, each dog has a personal standard duration, like 5 Hours/day.
When i create an event, i put start datetime and a end datetime (same day) to have the duration. Now, i would avoid that a user create other event for the same dog, if the sum of all the durations for the same dog in the same day exceed the personal standard duration
Solved! Go to Solution.
With the validation, try something like..
(
SUM(
SELECT(Events[Duration],
AND([Dog]=[_THISROW].[Dog],[Date]=[_THISROW].[Date])
)
)
+
[Duration]
)
<=5
With the validation, try something like..
(
SUM(
SELECT(Events[Duration],
AND([Dog]=[_THISROW].[Dog],[Date]=[_THISROW].[Date])
)
)
+
[Duration]
)
<=5
User | Count |
---|---|
35 | |
31 | |
30 | |
19 | |
18 |