Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello. I'm having an issue with my expression. I'm trying to count any time that the status changes and the status type is either one of these status types. I don't know what I'm doing wrong here, says I'm missing a ) somewhere? Thanks for the help.
COUNT(DISTINCT if(StatusChanges > 0 AND (SP_StatusType = 'ONSITE' , OR SP_StatusType = 'TRIAGE', OR SP_StatusType = 'REPAIR IN PROGRESS', OR SP_StatusType ='LEAVING SITE',
OR SP_StatusType = 'PRODUCT SHIPPED'),SP_RFACallNumber))
/
Count(DISTINCT SP_RFACallNumber)
HI
Try like below
COUNT(DISTINCT {< StatusChanges = {">0"}, SP_StatusType = {'ONSITE', 'TRIAGE', 'REPAIR IN PROGRESS', 'LEAVING SITE', 'PRODUCT SHIPPED'} >} SP_RFACallNumber)
/
Count(DISTINCT SP_RFACallNumber)
Hi,
Commas between OR are the issue. I would suggest using wildmatch() function to compare strings if possible in your in expression.
Thanks,
Ashutosh
Is StatusChanges a field in your data model, if not can you add it? This is better done in set analysis:
COUNT(DISTINCT {< StatusChanges = {">0"}, SP_StatusType = {'ONSITE', 'TRIAGE', 'REPAIR IN PROGRESS', 'LEAVING SITE', 'PRODUCT SHIPPED'} >} SP_RFACallNumber)
/
Count(DISTINCT SP_RFACallNumber)
HI
Try like below
COUNT(DISTINCT {< StatusChanges = {">0"}, SP_StatusType = {'ONSITE', 'TRIAGE', 'REPAIR IN PROGRESS', 'LEAVING SITE', 'PRODUCT SHIPPED'} >} SP_RFACallNumber)
/
Count(DISTINCT SP_RFACallNumber)
Thank you 😊