// converted to php if statement, to better understand it in a php way
$cellValue = '';
// if(A2=""
if ($a2 = "") {
// ;""
$cellValue = "";
} else {
// ;if(OR(R2="Email";L2="Service Catalog")
if ($r2 = "Email" || $l2 = "Service Catalog") {
// ;0
$cellValue = 0;
} else {
// ;IF(AND(I2=VRAI;J2="Yes")
if ($i2 = $vrai && $j2 = "Yes") {
//;1
$cellValue = 1;
} else {
// ;0)))
$cellValue = 0;
}
}
}
So the breakdown is for where the cellvalue would equal 1,
if A2 is not empty, and R2 is not 'Email' or L2 is not "Service Catalog', and I2 = 1 and J2 = "Yes"
This should result in the cellvalue = 1
What table/columns match the A2, R2, L2, VRAI, J2
If i have the tables/colums right,
A2 = table 'ticket_dim', column 'Number'
R2 = table 'fact', column 'Contact_type'
L2 = table 'fact', column 'Category'
J2 = table 'tickets_dim', column 'fcr_resolvable'
I2 = table 'tickets_dim', column 'fcr_resolved'
VRAI = 1
Maybe changing these,
$FCR_SPL=DB::table('fact')
->join('tickets_dim', 'fact.fk_ticket', '=', 'tickets_dim.Id')
->join('contact_dim', 'fact.fk_contact', '=', 'contact_dim.Id')
->whereNotNull('tickets_dim.Number') // A2 not empty
->where('Contact_type','not like','%Email%') // R2 not equal 'Email'
->orwhere('Category','not like','%Service Catalog%') // L2 not equal 'Service Catalog'
->where('tickets_dim.fcr_resolvable','=','Yes') // J2 equal 'Yes'
->where('tickets_dim.fcr_resolved','=','1') // I2 equal 1
->count();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community