cancel
Showing results for 
Search instead for 
Did you mean: 

Count the request Id between Start Date and end Date

Former Member
0 Kudos

Hi All,

I have user prompt with start date and end date, and i want to count of request Id for the first "1-3 days"  similarly for 4-7 days, 7-14 days and older than 14 days, can you please help on, how to get this requirement solved.

Thnaks,


Accepted Solutions (1)

Accepted Solutions (1)

CarlyThomas
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rama,


Can you provide some more detail?  Is the "Request Id" an object in the report?  Or are you trying to get auditing details?

And which version of the product are you using?

You should be able to use a named formula (variable) to count days between and then use the Count() standard calculation on the Request Id object to get the results.

I think maybe a break on the resulting table on the days between based on the number of days would get you the individual counts.

We have a calculations and formulas guide on http://help.sap.com that should be able to help build your formulas.

I hope that helps.

Carly

Former Member
0 Kudos

Yeah, it sounds like Rama might want to utilize the =DaysBetween() formula.

Thanks,

Nate

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Create the following two local variables:

a) Create a custom dimension, say v_Request_ID using formula below:

=If (DaysBetween( [Startdate]; [Enddate]) > 0 And DaysBetween( [Startdate]; [Enddate])<=3) Then

"1-3 days" ElseIf (DaysBetween( [Startdate]; [Enddate]) > 3 And DaysBetween( [Startdate]; [Enddate])<=7) Then "4-7 days" ElseIf (DaysBetween( [Startdate]; [Enddate]) > 7 And DaysBetween( [Startdate]; [Enddate])<=14) Then "8-14 days" Else "14+"

b) v_Count_Request_ID

= Count([RequestID])

Now, just drag the objects (v_Request_ID and v_Count_Request_ID) that you created in the report block.   You should get what you need. 

You can also do a distinct count by adding the word DISTINCT while creating (b).

Hope that helps.

Regards,

Irfan Mohammed