Former Member

### Calculate the number of days between 2 dates SAP Business Bydesign

Hello,

I work with SAP Business ByDesign. I want to create a key figure who can calculate the number of days between 2 dates, How can I do that ?

Thank you.

10|10000 characters needed characters exceeded

• May 25, 2017 at 08:22 PM

Hi Justin,

I am facing the same issue as you describe here. As I understand it is necessary to create two key figures and then create a third one with the calculation.

I found this doc but I still don't think this is the answer:

https://archive.sap.com/documents/docs/DOC-63315

Thank you,

10|10000 characters needed characters exceeded
• Former Member
May 29, 2017 at 12:27 PM

Hi Pedro,

Yes I've solved my problem, the answer is really simple, if you want to calculate the number of days between 2 dates ( date 1 and date 2 for exemple), you just have to create a third calculated key figures with the following calcul : "date 2" - "date 1".

10|10000 characters needed characters exceeded
• Hi Justin,

On your report or data source, there were those key figures already on the system, right?

How did you do it? Create a Key Figures from a field

Example:

There are any Key Figures for this data source and I would like this logic:

Complete Date - Sent Date

Sent for Approval DateSENT_FOR_APP_DATE Completed On DateAPPROVED_ON_DATE

• Jun 08, 2017 at 02:23 PM

Hi Pedro, this is a great example and thanks for sharing this with us. At the moment we do not have the functionality to compare two characteristic values (here two dates) and leverage this in our reporting. As said below current IF functions are limited to key figure validations.

The only short-term solution, which would solve your problem would be to do those type of evaluations in Excel using our Excel-Add in. Please find more details in the open SAP training on ByDesign Reporting in Week 4. For your convenience here is the link: https://open.sap.com/courses/byd2/items/67JZyMdpHt9p4wSEjJl4qU

Kind Regards