Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to find the error in expression like i am getting red underline at the flower braces,can any one find out why it is happen and please guide me.
Can you post this expression as text instead of image? Also, you can try using If statement within Count instead of Set Analysis or create a field in the script for the left hand side of the set analysis equation.
Please copy paste your script
if (CenterName='ThirdParty',0,1-((count({<vDate={">=$(=(MonthStart(vYesterday)))<=$(=vYesterday)"}>} if((Satisfied<4.5),ServiceOrderNo))
)/(count({<vda={">=$(=(MonthStart(vYesterday)))<=$(=vYesterday)"}>) ServiceOrderNo)))
if (CenterName='ThirdParty',0,1-((count({<vDate={">=$(=(MonthStart(vYesterday)))<=$(=vYesterday)"}>} if((Satisfied<4.5),ServiceOrderNo))
)/(count({<vda={">=$(=(MonthStart(vYesterday)))<=$(=vYesterday)"}>) ServiceOrderNo)))
am getting the error at vDate={ at this brace
vDate is a variable or a field created in script?
Sunny is right , please explain some more about your expression
It's a variable like vDate=date#(%key,'0123456789','MM/DD/YYYY) WHERE %KEY IS A COMPOSITE KEY
I think you should create a field called date in your Script:
LOAD %key,
Date(Date#(KeepChar(%key,'0123456789/'),'MM/DD/YYYY)) as DateField
From Source
Then give a shot at your expression with the following changes:
If(CenterName='ThirdParty', 0, 1-((Count({<DateField={">=$(=Date(MonthStart(vYesterday)))<=$(=Date(vYesterday))"}>} if((Satisfied<4.5),ServiceOrderNo))
)/(count({<DateField={">=$(=Date(MonthStart(vYesterday)))<=$(=Date(vYesterday))"}>) ServiceOrderNo)))