Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jeroen_vd_Waart
Product and Topic Expert
Product and Topic Expert


While trying to create a nice dashboard for the revenue per sales person, it occured to me there is no way to filter the dashboard for example for the current quarter. So first I created a specific dashboard per quarter, but that meant that every new quarter you needed to change the dashboard, or you look at old data.

Working this out I was thinking about creating a 'calculated measure' like: if(Invoice Quarter = Current Quarter, Revenue, 0)

Via the pre delivered attribute DIM_REFDATE it was pretty easy to find out the Quarter for the Invoice. The current quarter was more difficult, because there is no function like Quarter(now()) in the calculated measures. There is a function component which can extract a year, month, day, hour and second from a timestamp.

I used this component to extract the current quarter like this:

if(component(now(),2)<=3,1,if(component(now(),2)<=6,2,if(component(now(),2)<=9,3,if(component(now(),2)<=12,4,0))))

where component(now(),2) extracts the number of the month, f.e. Februari=2