Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am trying to fix my expression and am stuck in figuring out where that ')' is actually missing. Seems it isn't missing but something else is going on.
IF($(v_ConversionStage) = '5. Sold',
(
Count({<CRMOpportunityStatusName = {'5. Sold'},
CRMCreatedDate = {">=$(=Date(AddMonths(Max(CRMCreatedDate), -$(vLookbackPeriod))))<=$(=Max(CRMCreatedDate))"}>}
DISTINCT CRMOpportunityID)
/
Count({<CRMCreatedDate = {">=$(=Date(AddMonths(Max(CRMCreatedDate), -$(vLookbackPeriod))))<=$(=Max(CRMCreatedDate))"}>}
DISTINCT CRMOpportunityID)
),
IF($(v_ConversionStage) = '4. Clock Stop',
(
Count({<CRMOpportunityStatusName = {'4. Clock Stop'},
CRMCreatedDate = {">=$(=Date(AddMonths(Max(CRMCreatedDate), -$(vLookbackPeriod))))<=$(=Max(CRMCreatedDate))"}>}
DISTINCT CRMOpportunityID)
/
Count({<CRMCreatedDate = {">=$(=Date(AddMonths(Max(CRMCreatedDate), -$(vLookbackPeriod))))<=$(=Max(CRMCreatedDate))"}>}
DISTINCT CRMOpportunityID)
),
IF($(v_ConversionStage) = '3. Proposal',
(
Count({<CRMOpportunityStatusName = {'3. Proposal', '2. Qualified'},
CRMCreatedDate = {">=$(=Date(AddMonths(Max(CRMCreatedDate), -$(vLookbackPeriod))))<=$(=Max(CRMCreatedDate))"}>}
DISTINCT CRMOpportunityID)
/
Count({<CRMCreatedDate = {">=$(=Date(AddMonths(Max(CRMCreatedDate), -$(vLookbackPeriod))))<=$(=Max(CRMCreatedDate))"}>}
DISTINCT CRMOpportunityID)
),
IF($(v_ConversionStage) = '2. Qualified',
(
Count({<CRMOpportunityStatusName = {'2. Qualified'},
CRMCreatedDate = {">=$(=Date(AddMonths(Max(CRMCreatedDate), -$(vLookbackPeriod))))<=$(=Max(CRMCreatedDate))"}>}
DISTINCT CRMOpportunityID)
/
Count({<CRMCreatedDate = {">=$(=Date(AddMonths(Max(CRMCreatedDate), -$(vLookbackPeriod))))<=$(=Max(CRMCreatedDate))"}>}
DISTINCT CRMOpportunityID)
),
// Optional: else clause if none of the above conditions are met
0
))))
Any pointers are welcome.
@mma_sig
try putting variables in single quotes
IF('$(v_ConversionStage)' = '5. Sold',
....
Regarts,
Matheus
@mma_sig
try putting variables in single quotes
IF('$(v_ConversionStage)' = '5. Sold',
....
Regarts,
Matheus
Hi @MatheusC,
Thank you, that actually did it, learned something just now!
Best,
mma