hello everybody
in a view with name “inop” i have a list with of the means inoperative e the date.
how do I calculate how many days are inoperative?
thanks
Please clarify.
Excuse me.
In a filter slice the computers that are inoperative.
I would like to see how long they remain inoperative in days
If the out-of-service/inoperative time is in a Date-type column, you can compute the number of days with:
(TODAY() - [DateColumn])
If the out-of-service/inoperative time is in a DateTime-type column, you can compute the number of days with:
ROUND(HOUR(NOW() - [DateTimeColumn]) / 24.0)
ok!
but can i add this formula olso in a virtual column?
@Cannone_Cannone
Yes you can. It’s an expression at the end.
Sorry
but when I enter the formula in the virtual column I get this error
Column Name ‘how many days’ in Schema ‘GSE_Schema’ of Column Type ‘DateTime’ has an invalid app formula ‘= ROUND (HOUR (NOW () - [days]) / 24.0)’. Arithmetic expression ‘(NOW () - [Days])’ has inputs of an invalid type ‘Unknown’
Your [days] column is probably not a DateTime field.
I confirm that I have a column set to datetime
I may be completely off base here, but does your NOW() expression have a space before the brackets? Your post is showing your expression error as NOW_()?
Might not be the cause and just the way the error is reported…
perfect!!! tanks a lot!
one last thing
the virtual column how should I set it?
data, data time, text
There is a way to only count the days when the status column is = “inop”
User | Count |
---|---|
44 | |
28 | |
28 | |
21 | |
13 |