cancel
Showing results for 
Search instead for 
Did you mean: 

How to set dynamic date filter for KPI evaluation path

former_member306668
Participant
0 Kudos

Hi;

We have created a Custom Analytical Query that is based on a Custom CDS View that joins following views: I_EngmntProjSalesMarginCube and I_EngagementProject.

We now want to use the query in a KPI to display (on a tile) the planned revenue for projects that start in the current month.

This works fine when we hard code the date in the Input Parameters and Filters of the KPI’s evaluation path.

However when using the Date Functions FIRSTDAYOFCURRENTMONTH AND LASTDAYOFCURRENTMONTH, the KPI tile returns and error.

How can we use a dynamic date for the KPI tiles?

 

Thanks

Thomas

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Thomas,

Currently only ABAP CDS syntax is accepted.

We have the documentation available here: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abencds_f1_date_time_functions.htm

Would suggest to start with the session variable $session.system_date and try to find a formula to compute the first and last days of the month.

Best,

Adriana

former_member306668
Participant
0 Kudos

adriana.cosma can this be then be used in app Custom CDS View and I would need to built a completely new custom cds view and analytical query for each date range. For example if I want a KPI tile to display values for current month and last month I would need 2 views and queries?

Answers (2)

Answers (2)

former_member306668
Participant
0 Kudos

The answer from SAP Support, was this is currently not supported for Dimensions. However it is planned for 1811 which is only days away.

Has anyone had luck to have dynamic date filters for Custom Analytical Queries? Basically for the default value for the prompt window?

Regards

Thomas

MartyMcCormick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Thomas

I don't have a solution for you but I believe the date functions return in format MM/DD/YYYY. As a test, if you put in 10/01/2018 and 10/31/2018 into the Creation Date do you get the same error as when you are trying to use the dynamic date function?

Thanks,

Marty