Skip to Content
author's profile photo Former Member
Former Member

Calculating KeyFigures values for the time interval entered in the prompts

Hi All,

We have a requirement to be achieved in a Calculation View (preferably Graphical)

Here is the requirement, it is required to calculate the %KF- A value which is the result of division of KF Numerator with KF Denominator. How those KeyFigures are derived are as shown below.

This calculation to be based on the date entered by the user in the prompt during query execution. If the user enters date from Jan-1 till Jan-31, the report should display 31 records with one record each for the day and calculation to be based only for that time interval entered by the user.


% KF-A

KF Numerator

KF Denominator

Date1 - Distinct list of Dates in record set, based on date interval given in selection in prompt.

KF-Numerator

Date1/ KF

Denominator

on Date1

Count of documents with the following timestamp filters:

Timestamp (Date1, Prompt time) >= Date-A

AND

Timestamp (Date1, Prompt time) < Date-B

AND

Timestamp(Date1, Prompt time) >= Date-C

AND

Exclude records when Char-A = ‘x’

And few other date filters like the above three

Count of documents with the following timestamp filters:

Timestamp (Date1, Prompt time) >= Date-A

AND

Timestamp (Date1, Prompt time) < Date-B

AND

Exclude records when Char-A = ‘x’

And few other date filters like the above three

Date2

KF-Numerator

Date3/ KF

Denominator

on Date3

Same logic as above but replace Date1 with Date2

Same logic as above but replace Date1 with Date2

Date3

KF-Numerator

Date3/ KF

Denominator

on Date3

Same logic as above but replace Date1 with Date3

Same logic as above but replace Date1 with Date3



The problem we have here is how to do the calculations for each day between the intervals entered by the user and get the KF Numerator and KF Denominator value for that time interval.

We are trying to achieve this on an already built Calculation View. The final output would look something like this for the date between 1st Jan 2016 till 10th Jan 2016


Date Interval in prompt % KF A KF Numerator KF Denominator 1/1/2016 89.60% 198 221 1/2/2016 89.60% 198 221 1/3/2016 89.50% 205 229 1/4/2016 89.50% 205 229 1/5/2016 89.50% 205 229 1/6/2016 89.50% 205 229 1/7/2016 89.50% 205 229 1/8/2016 93.50% 215 230 1/9/2016 93.50% 215 230 1/10/2016 93.50% 215 230


This is like a loop concept in ABAP where in the values to be calculated for each day between the intervals entered in the prompt.


Regards,

Pramod

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Sep 06, 2016 at 10:24 AM

    This can be done in a graphical calculation view. You can use the input dates to join to a master data table to generate your dataset, a loop is not required.

    See this post for a similar example -

    Michael

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.