I have added another line(bold one) to the formula but now I get the syntax error missing ")", can somehone help me to fix it. Also I actually would like to state equals= a value between 364-365.999 (and not just 365) then it should also take total price? How can I do this?
Many thanks for your help,
Philipp
IF(
CASE(PricebookEntry.Product2.Family,
'Rollout Services',1,
'Continuity Services',1,
'Education',1,
'Innovation Services',1,
0)=0,
IF(YEAR(Valid_to__c)= YEAR(Valid_from__c),TotalPrice,
IF(YEAR(Valid_to__c) - YEAR(Valid_from__c) = 365,TotalPrice,
IF(NOT(ISBLANK( Valid_to__c )) && NOT(ISBLANK( Valid_from__c ) ),(TotalPrice / ROUND((( Valid_to__c - Valid_from__c +1)/365.2425),10)),
IF(ISBLANK( Valid_to__c ) && ISBLANK( Valid_from__c ),(TotalPrice / ROUND (((Opportunity.Valid_to_Platform__c - Opportunity.Valid_from_Platform__c+1) / 365.2425),10)),0))),0)
Try this =
IF(
CASE(
PricebookEntry.Product2.Family,
'Rollout Services', 1,
'Continuity Services', 1,
'Education', 1,
'Innovation Services', 1,
0
) = 0,
IF(
YEAR(Valid_to__c) = YEAR(Valid_from__c),
TotalPrice,
IF(
YEAR(Valid_to__c) - YEAR(Valid_from__c) = 365,
TotalPrice,
IF(
NOT(ISBLANK(Valid_to__c)) &&
ISBLANK(Valid_from__c),
(TotalPrice / ROUND(((Valid_to__c - Valid_from__c + 1) / 365.2425), 10)),
IF(
ISBLANK(Valid_to__c) &&
ISBLANK(Valid_from__c),
(TotalPrice / ROUND(((Opportunity.Valid_to_Platform__c - Opportunity.Valid_from_Platform__c + 1) / 365.2425), 10)),
0
)
)
)
),
0
)