Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bonjour,
Je travaille à l'aide de fichier QVD avec une vingtaine de tables. Dans a peu près chaque table il y a un champ date.
Afin de créer un calendrier principal j'ai crée un DateBridge regroupant les champs date des tables relié à ma table maitre.
Voici l'exemple:
DateBridge:
Load
'person.created_at' as DateType,
patient_id,
Date(FLOOR(person.created_at),'DD/MM/YYYY') as Date
Resident person;
Load
'person.confirmed_at' as DateType,
patient_id,
Date(FLOOR(person.confirmed_at),'DD/MM/YYYY') as Date
Resident person;
Load
'record_signins.created_at' as DateType,
patient_id,
Date(FLOOR(record_signins.created_at),'DD/MM/YYYY') as Date
Resident record_signins ;
Load
'quiz_playbacks.created_at' as DateType,
patient_id,
Date(FLOOR(quiz_playbacks.created_at),'DD/MM/YYYY') as Date
Resident quiz_playbacks ;
Load
'program_playbacks.created_at' as DateType,
patient_id,
Date(FLOOR(program_playbacks.created_at),'DD/MM/YYYY') as Date
Resident program_playbacks ;
Load
'assigned_program.created_at' as DateType,
patient_id,
Date(FLOOR(assigned_program.created_at),'DD/MM/YYYY') as Date
Resident assigned_prog ;
Après avoir créé mon DateBridge je l'ai relié à mon Mastercalendar. Jusqu'ici tout fonctionne mais le problème apparait quand je veux utiliser l'expression count en ne sélectionnant un DateType précis.
Exemple :
count({<[program_playbacks.completion_status]={'0','1'}, DateType={'program_playbacks.created_at'}>}DateType)
Cela me renvoie une mauvaise valeurs quand je ne sélectionne aucune date , tandis que quand je touche à la date cela me renvoie la bonne valeur .
J'ai essayé cette formule :
count({<[program_playbacks.completion_status]={'0','1'}, DateType ={'program_playbacks.created_at'}>}program_playbacks.created_at)
mais cette fois j'obtiens la bonne valeur sans toucher au champs date, mais par contre une fois que je change la date il apparait que des mauvaise valeur.
Pouvez-vous svp m'éclairer.
It's hard to say for sure, but I suspect that this is happening because of how you set up the data model and/or how you are handling Null values. When you count with the [DateType] field, you may not be accounting for Nulls values in selected DateTypes.
If I used the table from the screenshot above and tried to do:
=Count({<[DateType={'program_playbacks.created_at'}>} [DateType])
...then it would return one 1 instead of what it should return, which is zero 0.
I don't know what your use case is with these calculations but if you can use =Count([Date]) or =Count([patient_id]) instead, that may prove to be a more accurate count.
thank you, for your answer actually patient_id and date field is more accurate