function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nordine BensadiaNordine Bensadia 

saql binding date picker - multiples datasets

Hi,
I have an issue trying to build a table based on 3 different datasets.
This works, except I would like data from the 3 datasets to be filtered using only 1 calendar/date picker.
My date picker is named "Date_de_cr_ation_1".
Here is my SAQL below, could anyone help please? The issue must be on the "date filters" lines.

Thanks a lot for your help,

Nordine.


m = load "Email_Cases";
m = group m by 'ParentId.Case_Language__c';
m = filter m by 'Incoming' == "true";
m = filter m by date('MessageDate_Year', 'MessageDate _Month', 'MessageDate _Day') in {{selection(Date_de_cr_ation_1)}};
m = foreach m generate 'ParentId.Case_Language__c' as 'Case_Language__c', count() as 'mails';
f = load "Case_091116";
f = group f by 'Case_Language__c';
f = filter f by 'Is_Formulaire__c' == "true";
f = filter f by date('CreatedDate_Year', 'CreatedDate_Month', 'CreatedDate_Day') in {{selection(Date_de_cr_ation_1)}};
f = foreach f generate 'Case_Language__c' as 'Case_Language__c', count() as 'formulaires';
c = load "Task_case_user_141116";
c = filter c by date('OdigoCti__Call_start_time__c_Year', 'OdigoCti__Call_start_time__c_Month', 'OdigoCti__Call_start_time__c_Day') in {{selection(Date_de_cr_ation_1)}};
c = group c by 'WhatId.Case_Language__c';
c = foreach c generate 'WhatId.Case_Language__c' as 'Case_Language__c', count() as 'calls';
cm = union f, m, c;
cm = group cm by 'Case_Language__c';
cm = foreach cm generate 'Case_Language__c' as 'Case_Language__c', sum('mails') as 'mails', sum('formulaires') as 'formulaires', sum('calls') as 'calls', (sum('mails') + sum('formulaires')) + sum('calls') as 'Total COntacts';