Use Date data type field as key figure in Analytics
With 1605 version of SDK, PDI user can use date data type field as key figure in analytic. Characteristics property of Date data type will not change and
user have flexibility of create a key figure for date field with existing characteristics behavior.
Create Date type Field as Key figure in Data source
In SDK wizard of Data source at step Transformation Rules when you select field of type of Date then you have option to create Date as Key Figure.
A new Key figure will be added in data source which can be seen in Aggregation steps in wizard. Aggregation option are limited For new Date type key figure, only Maximum and Minimum is allowed for date.
There is not major changes in Data source wizard, User can create Date as key figure in data source by followin below steps
1. Add new item and create new Data source
2. Enter details Namesapce, Business object, Anchor Node etc and click next
3. Select required field in data source including field of data type Date, Click Next
4. In Transformation Rule steps, you will see check box ‘Date Key Figure’ will be enable on selection of Date field in business object element
a. Leave check box empty: No changes will occur and Date field will be used as characteristics only
b. Check the check box it will create a new Key figure,
c. un-check it will remove the key figure. To delete added key figure you should un-check the check box. Click next,
5. In Define Reference Data Source, you can rename the field click on Next
6. In Define Aggregation Behavior, here you can see Date field listed for aggregation.
You can define aggregation as Maximum or Minimum only from the drop down
If you try to add another Aggregation, it will not allow you to add, e. g. Summation or Count in aggregation, it will show message and reset to Minimum
7. In the Review step, check that all the information you have entered is correct and also check the under Key figures Date type fields should be added, then click Finish. In the Solution Explorer, a new item is added for your data source.
8. Activate the data source and Create Report
With this feature business user have flexibility to monitor report based on date or timeline, In Report records can be sorted based on date
You can create new calculated key figure for example calculate difference between two dates.
Business objects often contain date information, for example, for the orders, in reports report based on date it will be easy to sort all orders in ascending or descending.
User can create calculated key figure say difference between order created date and order delivered date in results you can tracks which orders has taken more time in delivery.
For example if you want to calculate no of days taken to fix a Ticket (service request), create a calculated key figure and add into report.
( here ‘CreatedOn’ and ‘SubmittedOn’ are Date type fields behave as keyfigure also, see in below image characteristics and keyfigure both are availalbe for date type field), “Difference” is new calculated keyfigure
Difference = “Created On” Date – “Submitted On” Date
[Update] Note : Only ‘Date’ data type field can be use for creating key figure, Other type( DateTime, GlobalDateTime etc) will not be supported for creating date keyfigure