Discussion
Wellsfargo
IN
Last activity: 4 Oct 2018 11:08 EDT
Business days difference in Report definition rule
Is there any functions available to calculate business days difference in report definition ?? if not please suggest how to calculate in report definition ??
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hello,
Without knowing your exact use case / user story, expected report results, and which version of Pega (PRPC) are you using (example: PRPC v6.2sp2, Pega 7.1.6, etc.), it is difficult to provide a specific answer.
In a Report Definition report, you can populate a column of the report using an nested SQL function and Standard functions available in the Pega-RULES:BusinessCalendar library are available which use business day and holiday information.
Something to keep in mind here would be the Pega definition of 'Business Days.' According to Pega Developer Help:
A business day is a day that is not identified as a holiday nor identified as a weekday with no work, on the Schedule tab of a calendar data instance.
Standard functions in the Pega-RULES:BusinessCalendar library use business day and holiday information. For example, you can compute the number of business days (based on a specific calendar) between two dates. Business days are sometimes called work days.
If your application includes multiple calendar data instances, a non-business day for some users may be a business day for others.
Hello,
Without knowing your exact use case / user story, expected report results, and which version of Pega (PRPC) are you using (example: PRPC v6.2sp2, Pega 7.1.6, etc.), it is difficult to provide a specific answer.
In a Report Definition report, you can populate a column of the report using an nested SQL function and Standard functions available in the Pega-RULES:BusinessCalendar library are available which use business day and holiday information.
Something to keep in mind here would be the Pega definition of 'Business Days.' According to Pega Developer Help:
A business day is a day that is not identified as a holiday nor identified as a weekday with no work, on the Schedule tab of a calendar data instance.
Standard functions in the Pega-RULES:BusinessCalendar library use business day and holiday information. For example, you can compute the number of business days (based on a specific calendar) between two dates. Business days are sometimes called work days.
If your application includes multiple calendar data instances, a non-business day for some users may be a business day for others.
That being said, consider using a BusinessCalendar function in one of the data columns. Here is a link to a PDN article you might find helpful: https://pdn.pega.com/reporting/how-to-use-nested-sql-functions-in-report-definition-rules.
Kind regards,
Bob Lloyd
PDN and Pega Academy Self-study Forums Support Team
Wellsfargo
IN
Thanks for the reponse .
I am using pega 7.1.6
1) My requirement is , I need to display the records whose age less than 10 days . (here age is Bussines days difference between CreateDateTime and CurrentDate )
here i am not able to understand how to write sql function with Pega business calander ...Could you please provide any sample code ..
Pegasystems Inc.
US
Here are some examples using expressions: (There is additional information and examples in Help on the PRPC portal.
Function calls
Your expressions can call built-in functions, functions in standard libraries, and custom functions. See Functions in expressions.
@SUM(.SubComponents().Price)
@Pega-RULES:MapTo.Function(argument1, argument2)
All combined
Expressions can incorporate all the elements described in this topic together:
@SUM(.SubComponents(38+.Offset).Price)
I think an easier way to accomplish what you are trying to do is simply write a report pulling the last 10 days of new cases.
Wellsfargo
IN
lets say i need to calculate business days differnce between 2 dates in report definition ..Can you please let me know how to include pega calander in sql funcitons ??
there is ootb function "differnce between days", but need to calculte difference between business days ..
Infosys
US
Any updates on the query, I have similar requirement.
Tata Consultancy Services Ltd
AU
Hi All, We too have the same logic to be developed. In RD functions, we were able show the difference between the two date times attributes. But it was not consider the business calendar that had been configured. Any suggestions?