cancel
Showing results for 
Search instead for 
Did you mean: 

Keyfigure type for Total No of days

former_member215567
Participant
0 Kudos

Hi Experts,

As for my requirment i need to write field level routine for getting total no of days.

I have two char for start date and end date when i am mapping these two char in tranformations to key figure showing error (Source parameter /BIC/xxxxx) is not being used) .

Which type of key figure i need to create for this ?

Thanks - Siva

Accepted Solutions (0)

Answers (6)

Answers (6)

snitwipro
Active Participant
0 Kudos

Hi,

   I think you can use a key figure of type integer, data type INT4 to store the number of days.

Regards

Sourav

former_member241605
Active Participant
0 Kudos

Hello Venkat,

Since you mentioned your Two Characteristics are Dates then you can create your Keyfigure with option "Integer / Numc".

In the Transformation Map your both dates to the Keyfigure you wanted and write a field routine

  \*  RESULT = SOURCE_FIELDS-/BIC/XXXXX - SOURCE_FIELDS-/BIC/XXXXXX.  */

And if you want see this column  in the query then create a new formula by giving the name "total no of days" then

1) keep your two date characteristics in Rows area

2) Create Formula With Replacement path on each DATE Characteristic and keep each one in local formula and you have to hide both formula.

3) Now finally in your wanted column "total no of days" you place this two formula and subract it as Startdate - End date.

Hope this will help You!!

With Regards,

PJ.

yasemin_kilinc
Active Contributor
0 Kudos

Hi Venkat,

For total number of days you can define the key figure type as numc. Then you can directly do the calculation in field level routine using formula such as DATE_DIFF(Start_Date, End_Date).

Hope it helps

Yasemin...

Former Member
0 Kudos

Hi Venkat,

Why u go to calculation in Bex Query Designer for Total No of Days.

Thanks,

Purushotham.

former_member182343
Active Contributor
0 Kudos

Hi,

Use FM ' FIMA_DAYS_AND_MONTHS_AND_YEARS' at transformation level and get start date and end date from source and get difference between 2 dates.

Regards,

Vijay

ravi_chandra3
Active Contributor
0 Kudos

Hi

Create characteristic with NUMC  as datatype.