Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
lrenwick
Contributor III
Contributor III

Set Analysis Calculation - Incorrect brackets?

I have a calculation I'm trying to re-work. 

The user has asked for a calculation that is akin to:

sum(Leaver)

/

((sum(HeadCount)/Months)+sum(Leavers))

 

I've tried a few variations of wrapping sum around various parts of the code and I'm not getting anywhere close. My  full code is below:

num(

sum({$<MonthYear=,[Budget Version]=,$(vYTDSetAnalysis),WeeklyOrMonthly={M},Date_Type={A} $(vSalesAndOrSupport)>}Leaver)

/

sum(
{<[MonthYear + To Date]=,[Budget Version]=,MonthYear=,WeeklyOrMonthly={M},Date_Type={A},DT={">=$(=$(vRollingStartDate))<=$(=$(vRollingEndDate))"} $(vSalesAndOrSupport)>}
EmployeeCount)
/
(vRollingNumberOfMonths))


+

sum({$<MonthYear=,[Budget Version]=,$(vYTDSetAnalysis),WeeklyOrMonthly={M}$(vSalesAndOrSupport)>}
Leaver)

,$(vNumFormat(Percent))

Any ideas/help is massively appreciated! 

Labels (2)
2 Replies
Marcos_rv
Creator II
Creator II


Hello how are you ? I recommend that you use a text object and throw each code block of that metric there,
it would be, to have the numbered and denominator separated, this is to see what values ​​you are dividing, added to that those analytical sets do not look very good, you may have syntax problems, therefore it gives you nulls and not the expected result.

Regards!!!

manoranjan_d
Specialist
Specialist

WeeklyOrMonthly={'M'}

Date_Type={'A'}

$(vSalesAndOrSupport) this has to be assigned to your desired field