Duration chart
Hi ! Is it possible to calculate a duration to display it on a graph?
I would like to have a graph that displays the time worked each month. This calculation is based on the "Durée" field of the "Activités" table. Each record in the activity table contains an appointment date. From this appointment date, I extract the duration in the "Durée" field.
I would like my dashboard to show the total duration month by month in the form of a graph.
I was thinking of something like this below but it doesn't work :
Graph formula :
let filterStart := 'Début du filtre';
let filterEnd := 'Fin du filtre';
select 'Activités'
where date('Date du rendez-vous') >= filterStart and
date('Date du rendez-vous') <= filterEnd and
Statut = 6
Statut = 6 is equal to Status completed
Column 1 : (regroup)
format('Date du rendez-vous', "YYYY-MM")
Column 2 : (sum)
'Durée'
The sum of the durations month by month is not done.
Thanks for your help.
10 replies
-
I still haven't been able to find a solution. If anyone has an idea, it will be with pleasure!
-
It seems that the Ninox grapher does not accept the time value, only the numbers. I create a function to get the number of hours from the Duration :
number('Durée') / (1000 * 60 * 60)
Here is view with 'Durée' and 'Durée en nombre d'heure' :
I have added this value to the columns of the graph:
And now it work fine :
-
It works perfectly. I added a round() function to make it easier to visualize on the chart. Thanks a lot for your help !
-
Sébastien Guillet said:
Here's the result : nid(["V1","V2","V3","V4","V5","V6","V7","V8","V9","V10","V11","V12","V13","V14","V15"])
I don't quite understand what that means...this is the list of records returned by the select() function.
S is the internal identifier of the table "Formations" and the numbers correspond to each unique identifier of the records (value of the field "id").
Content aside
- Status Answered
- 1 yr agoLast active
- 10Replies
- 174Views
-
2
Following